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 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 allow { localhost; } keys { key; };

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

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

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

And the zone file in /var/named:

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

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

All of this should be changed to the domain you want.. 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 😛


Leave a Reply

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

You are commenting using your 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