BIND9 simple: sometimes you just want and need it….

I got sick of dns being outside of my hands and waiting several days for a damned MX record to be put in.
Made a simple dns server for the domain I put the mail server on… an internal unix .net domain (NOT a MS .NET, just a domain.net). Anyway, since I’m not too out of whack when it comes to software, I use BIND9 for DNS. It’s pretty straight forward.
Here’s the simple main configuration /etc/named.conf:

options {
directory “/var/named”;
dump-file “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
stacksize 30M;
datasize 20M;
# allow-update-forwarding { any; };
transfer-format many-answers;
version “DNS server”;
};

#controls {
# inet 127.0.0.1 allow { localhost; } keys { key; };
#};

zone “.” in {
type hint;
file “root.hint”;
};

zone “domain.net” IN {
type master;
file “domain.net”;
notify yes;
allow-update { none; };
};

zone “domain.com” IN {
type master;
file “domain.com”;
notify yes;
allow-update { none; };

And the domain.net zone file in /var/named:

$TTL    86400 ; 24 hours could have been written as 24h or 1d
$ORIGIN domain.net.
@  1D  IN        SOA mail.domain.net.        hostmaster.domain.net. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
)
IN      NS     ns.domain.net. ; in the domain
IN      MX  10 mail.domain.net. ; external mail provider
; server host definitions
mail    IN      A      10.1.4.84  ;name server definition
ns    IN      CNAME   mail

of course, copying the domain.net to domain.com and changing the .net to .com will fix that.

All of this should be changed to the domain you want.. domain.com is just an example, since I’m not out for advertising domain’s I’m working on.

It’s a simple thing… took me longer to type this up than it did to make it work, but it helps others, and it’s there on the net so screw it 😛

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s