If you're interested in running a Local DNS (Domain Name System) for your machine, the instructions are as follows. Please remember that this guide is only for local DNS requests. Other machines in the network (if you have any) will not be able to use it, unless some more work is done (I won't get into that).
1. Download an updated version of named.root and replace the current one (/var/named/caching-example/named.root). Even better, rename the original named.root to something like named.root.orig just in case:
$ curl 'ftp://ftp.internic.net/domain/named.root'
$ sudo cp /var/named/caching-example/named.root /var/named/caching-example/named.root.orig
$ sudo mv named.root /var/named/caching-example/named.root
2. Make BIND's daemon executable:
$ sudo chmod 755 /etc/rc.d/rc.bind
3. Start BIND:
$ sudo /etc/rc.d/rc.bind start
4. Make sure /etc/resolv.conf is using the local IP Address of the machine running BIND. You should have a line like this "nameserver <local ip address>" commented out (remove the # at the beginning of the line if there is one). If you're using NetworkManager to configure DNS requests (which I think it can do), you'll need to configure it properly. Any other nameserver lines in /etc/resolv.conf must be commented out (put a # at the beginning of the line so it's not used).
Example of a working line in /etc/resolv.conf: nameserver 192.168.0.1
5. Verify that it's working:
$ dig localhost
You should see the IP Address in "SERVER:"
or
$ nslookup localhost
You should see the IP Address in "Server:"
6. Once it's working, you may want to dump the server caches and zones to a file for inspection:
$ sudo rndc dumpdb -all
Post too long. Click here to view the full text.Post last edited at