Posts Tagged ‘nameserver’

How to setup a primary nameservers on a dedicated server

Friday, July 25th, 2008

Here are the steps:

  1. Locate named.conf and go to that folder.
  2. Add DNS entries for your nameserver.
  3. Edit the pri.yourname.com file for the domain you are adding nameservers for.
    Add these two lines at the bottom of the file:
    ns1 IN A 10.10.10.10 (replace with your nameserver IP)
    ns2 IN A 10.10.10.10
    By the way, you can host your website and nameservers on the same IP.

  4. Reload the nameserver daemon.
    $ sudo /etc/init.d/bind9 reload
  5. Ping the nameservers, and they should resolve to the correct IP.
    If they do not, edit /etc/resolv.conf and add the following line above all other lines beginning with “nameserver”, add:
    nameserver 127.0.0.1
  6. Go to your registrar of your domain name, and register the nameservers to point to the your nameserver IP.

Keeping the Root Hints Current

Friday, July 25th, 2008

To keep the root hints file current, use the following command.

$ dig @a.root-servers.net . ns > db.cache

How to check if nameserver is valid (NS1.example.com, NS2.example.com)

Wednesday, July 23rd, 2008

A.  How to check if nameserver is valid

$ dig ns com
;; ANSWER SECTION:
com. 93009 IN NS a.gtld-servers.net.
com. 93009 IN NS b.gtld-servers.net.
com. 93009 IN NS c.gtld-servers.net.
com. 93009 IN NS d.gtld-servers.net.
com. 93009 IN NS e.gtld-servers.net.
com. 93009 IN NS f.gtld-servers.net.
com. 93009 IN NS g.gtld-servers.net.
com. 93009 IN NS h.gtld-servers.net.
com. 93009 IN NS i.gtld-servers.net.
com. 93009 IN NS j.gtld-servers.net.
com. 93009 IN NS k.gtld-servers.net.
com. 93009 IN NS l.gtld-servers.net.
com. 93009 IN NS m.gtld-servers.net.

$ host NS1.example.com i.gtld-servers.net
Using domain server:
Name: i.gtld-servers.net
Address: 192.10.10.10#53
Aliases:

NS1.example.com has address 69.10.10.180

If the nameserver is invalid, you will not have the last line above.

B.  To check nameserver configuration of a site, do this:

$ nslookup -q=any example.com