Step by step how to setup DNS with Bind9 in Ubuntu

If you have static IP address (you should if you have cable connection), you could run your own DNS server. The Ubuntu version that I used was Ubuntu 7.04. Here’s how to setup DNS server with bind (bind9) in Ubuntu:

  1. Follow the steps in Howto: Setup a DNS server with bind , but when copy-pasting, remove all of the comment lines, e.g.: all lines starting with // and #. I spent hours trying to figure out why it wasn’t working. Basically the comment characters messed it up. There’s an explanation somewhere in that link thread.
  2. Verify that your bind configuration files are free of syntax error. See this article on How to check BIND configuration files for error.
  3. Check to see if you have any error when starting the DNS (bind9) server. Basically you do this by looking at the log at /var/log/daemons.log

Please note, I think step 1 above is mainly for local network. If you are setting up a DNS server for world wide web, change the IP addresses for ‘A’ records to your world wide web IP address (e.g.: your static IP address).