A quick cheat-sheet for setting up a forwarding, caching-only DNS Server on Ubuntu using BIND.
Edit /etc/bind/named.conf.options:
options {
directory “/var/cache/bind”;
// prevent firewall problems
query-source address * port 53;
forwarders {
// forward requests to
8.8.8.8;
221.132.112.8;
};
// don’t iterate
forward only;
// but DO cache (make it explicit)
recursion yes;
auth-nxdomain no; # conform to RFC1035
// don’t do IPv6
// listen-on-v6 { any; };
listen-on-v6 { none; };
// only listen on internal interfaces
listen-on { 192.168.2.1; 127.0.0.1; };
};
}
Finally, restart DNS services and check work:
/etc/init.d/bind9 restart
Also edit /etc/resolv.conf
and add at top
nameserver 127.0.0.1
I have a linux mail server on that we have dns . The configuration has forwarders and forward only and also the root hint zone.
My resolv.conf has nameserver 127.0.0.1 and forwarders IP listed one by one.
My question is how is the name resoluiotn done, when are the roothints used and when is the query forwarded.
LikeLike
Comment by khaleel — August 9, 2011 @ 11:17 PM
http://www.linux.ie/articles/dns.php
First /etc/nsswitch.conf file to determine the name resolution order.
then /etc/hosts
then /etc/resolv.conf
LikeLike
Comment by Pinochio / zaib — August 10, 2011 @ 10:48 AM