Thursday, September 6, 2007

How to set dns and register nameservers at domain registrar

How to set dns and register nameservers at domain registrar:

step: 1) When you create a new cPanel account (WHM -> Account Functions -> Create a New Account), any appropriate DNS settings that need to be made on your server for that domain are created automatically. All you need to do is point that domain to your name servers via your domain registrar's website.

Register Nameservers:

Register the domain you're going to use for your nameservers, then register ns1.newdomain.com and ns2.newdomain.com as nameservers (registries normally have a
special facility for doing that). The registry may also have a facility to propogate these nameservers around the foreign registries - if so, you should use this facility.

You can go DNSStuff.com to get reports to indicate if DNS is set up on your server correctly.

As for changing the nameservers from layeredtech, you'd need to contact your domain registrar regarding that information.
That particular functionality (setting nameservers at the registrar level) is not handled in the cPanel and WHM software.

step: 2) If you can see the default nameservers for of your domain registrar then Please go to this site and try to create your own DNS Zone using the following link:
http://www.megawebservice.com.br/sup...articl eid=14

If you want the mentioned nameservers to be the default across the server:

1) Locate two free IPs from the server and setup the nameservers using those IPs at your domain registrar.

2) Go to WHM -> Basic cPanel/WHM Setup
Change Primary Nameserver and Secondary Nameserver to the ones you setup

3) Go to WHM -> Add a DNS Zone
Create the zones for the nameservers and supply the correct IPs.

step: 3) Reverse DNS
You may also need to get your data centre to enter a reverse DNS pointer for your nameservers. You'll need to let them know each nameserver and its IP address.

Sometimes you can suffer non-delivery of mail if you don't so this. Reverse DNS pointers can take a while to propagate.

step: 4) If you are receiving broken ndc/bind

SSH to your box with root username and try out the following commands:

# /scripts/updatenow
# / scripts/ fixndc

Go back into WHM, go to the Restart Services section in the left menu and click DNS/Nameserver (BIND).

You will need to do this if you start getting 'ndc' errors when you are doing anything DNS related in WHM.

step: 5) Tidy Up Junk Nameservers
Go into WHM (Web Host Manager) and select Manage Nameserver IPs from the Server Setup menu on the left. Remove any nameservers you don't recognise.
This is just a tidy up exercise in case anyone's set anything up on the box before you.

step: 6) Initial Nameserver Setup
Go into WHM (Web Host Manager) and select Initial NameServer Setup from the Server Setup menu on the left:

Restart BIND (step 7 restarts BIND, but we've known it to need a proper stop and start for it to work) from SSH with:

service named stop
service named start

or

/etc/rc.d/init.d/named stop
/etc/rc.d/init.d/named start

step: 7) Manual Checks
I don't know what it is about this process, but it doesn't always work, so there are some things you can check manually via SSH.

# cat /etc/wwwacct.conf

Check that the nameservers are correctly specified on NS, NS2 etc.

# cat /etc/resolv.conf

Check that there are nameserver entries for each IP. There may also be one for 127.0.0.1

(By the 'man' entry for resolv.conf) that this isn't a particularly important file, but it could look like as follows:

domain andy.com
search andy.com
nameserver 127.0.0.1
nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx

Where 'andy.com' is the main domain of my server, and 'xx.xx.xx.xx' and 'xx.xx.xx.xx' are the IP addresses of primary and secondary nameservers.

/etc/resolv.conf is used to lookup names that are not in FQDN format.

# cat /etc/nameserverips

Check that there are entries for each IP acting as a nameserver.
This file contains the ip's of the primary and secondary nameservers.

Thats it, your dns server for cpanel has been configured in this way .