Thursday, September 10, 2009

Setup ITERATIVE DNS in Ubuntu 8.04 Server

Step 1: Fresh Install the Ubuntu server with option of DNS server during installation or you can install DNS latter in step 2.

Step 2: Install DNS if not installed before
root@ins# apt-get install bind9

Step 3: Edit /etc/bind/named.conf.options to disable recursion.

By default the recursion is enables(yes), you can add /uncomment the follwoing line in option field.

//recursion yes; //default

recursion no;

root@ins:/etc/bind# nano named.conf.options

options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.

// query-source address * port 53;

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

// forwarders {
// };

recursion no;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };

Step 4: Restart the bind
root@ins:/etc/bind# /etc/init.d/bind9 restart

Step 5: Testing

You can run wireshark in your machine and try to ping a host e.g ping

In trace you will see the response from dns server, expand the Domain Name System, Flags and Authoritative Server list can be seen.

No comments: