Web Hosting Forum | Lunarpages

Author Topic: Setting up Private Nameserver with Cpanel  (Read 40048 times)

Offline eLi

  • Trekkie
  • **
  • Posts: 18
Setting up Private Nameserver with Cpanel
« on: May 03, 2005, 08:59:32 AM »
This will allow your site to point to your own nameservers: ns1.yoursite.com and ns2.yoursite.com.

1. Registering domain (if you don't have one already)
Register your domain if you do not have one.  This domain will be used as your nameserver.  (eg. ns1.domain.com and ns2.domain.com)

2. Will need 2 available IPs
Lunarpages provides 2 IPs with the dedicated server.  One is for the server itself and one of the nameservers, and the other IP can be used for the other nameserver. You can have your primary domain and one nameserver both on the same IP address.

3. Register the nameservers.
You will need to contact your registrar to register your domain as a nameserver.  In most cases, you can login to your domain management page to set this up.  An example can be found at the following link: http://www.webhostingtalk.com/showthread.php?s=&threadid=237604

note: registrations can take up to 3 days to propagate.

4. Fix NDC
SSH into your server as root and run the following:
/scripts/updatenow
/scripts/fixndc

In WHM, restart DNS/Nameserver (BIND) - it is on the left window pane.

5. Setup nameservers in WHM
In WHM, select Basic cPanel/WHM Setup near the top in the left window pane.
Set the Primary Nameserver to ns1.yourdomain.com (the domain you registered).  Then click Assign IP Address.  Repeat this for the Secondary Nameserver section, using ns2.yourdomain.com.

On the bottom of the page, click Save.

note: the IPs will be set incorrectly, this must be changed in shell

6. Edit files in Shell
SSH into your server as root and open the following 2 files and edit (you can open a file using nano).  Check the key below.

file 1 - type:
nano /etc/resolv.conf
The file should be edited to look like this:
     domain yourdomain.com
     search yourdomain.com
     nameserver 127.0.0.1
     nameserver IP1
     nameserver IP2

Save (ctrl+o and enter) and close the file (ctrl+x).

file 2 - type:
nano /etc/nameserverips
The file should be edited to look like this:
     IP0=0
     IP1=ns1.yourdomain.com
     IP2=ns2.yourdomain.com

Save (ctrl+o and enter) and close the file (ctrl+x).

Keys used  above is explained below,

IP0=server ip
yourdomain = main domain of your server
IP1 = ip of nameserver 1
IP2 = ip of nameserver 2
ns1.yourdomain.com = nameserver 1 that you registered
ns2.yourdomain.com = nameserver 2 that you registered

7. Setup nameservers in WHM - final
In WHM, select Basic cPanel/WHM Setup near the top in the left window pane.
Set the Primary Nameserver to ns1.yourdomain.com (the domain you registered).  Then click Assign IP Address (should be the correct IP now).  Then click Add an A entry for this nameserver.  Repeat this for the Secondary Nameserver section, using ns2.yourdomain.com.

On the bottom of the page, click Save.

In WHM, select Manage Nameserver IPs.  You should see the correct 2 IPs and 2 nameservers.

8. Reboot server
SSH into server as root and type: reboot
When the server comes back and is set to your liking, you will have to contact your registrar and point your domain to your nameservers.  Until then, your domain will not point to the dedicated server.


Thanks to the following sites for reference:
http://www.webhostgear.com/11.html
« Last Edit: October 10, 2007, 02:01:27 PM by Danielle »

Offline thegreekrow

  • Trekkie
  • **
  • Posts: 16
Re: Setting up Private Nameserver with Cpanel
« Reply #1 on: April 20, 2006, 11:05:07 AM »
I just sign up for a dedicated account, and I changed my openSRS data to point to ns1.thegreekrow.com and ns2.thegreekrow.com with the correct IPs and everything.
I was looking through my server, and realized that resolv.conf file already existed, but not the nameserverips file. Do I need to create that file?!

as for the last step, how can i do that with webmin?

stephan

  • Guest
Re: Setting up Private Nameserver with Cpanel
« Reply #2 on: April 20, 2006, 12:40:22 PM »
Hi,

This tutorial is for setting up private nameservers with Cpanel.

From your other posts, I guess you are using Webmin, which doesn't have the nameserverips file (and doesn't need it)

When we hand over the Webmin servers they typically are setup with nameservers running for your private domain.

Offline thegreekrow

  • Trekkie
  • **
  • Posts: 16
Re: Setting up Private Nameserver with Cpanel
« Reply #3 on: April 21, 2006, 09:08:48 AM »
So.. if I have completed the aforementioned steps, am I ok? do i need to do anything else? I made the changes a little over 24 hours ago, and I know it takes 3 days to propagate, but i dont want to wait 3 days to find out that i screwed up.
So, I have webmin. what else do i need to do?!

What bothers me is that in my BIND DNS Server > thegreekrow.com Master DNS Zone, there is nothing.  By nothing i mean that there are no nameservers loaded. (screenshot attached)
« Last Edit: April 21, 2006, 09:15:40 AM by thegreekrow »

stephan

  • Guest
Re: Setting up Private Nameserver with Cpanel
« Reply #4 on: April 21, 2006, 12:29:01 PM »
You might need to create an A record. It looks blank to me.

You can check if your nameservers are working by using this tool http://centralops.net/co/NsLookup.vbs.asp

Put your domain in one box and ns1.yourdomain in the other box.

If you have trouble, please check out the Webmin documentation, or contact our support. We can't really help through the forum.

Offline thegreekrow

  • Trekkie
  • **
  • Posts: 16
Re: Setting up Private Nameserver with Cpanel
« Reply #5 on: April 21, 2006, 10:21:14 PM »
I have created a support ticket. The only problem is that the standard turn around time is 24 hours for a single question, and the answers arent very specific... I expected more from the people who claimed to be the #1 in customer support...

Offline thegreekrow

  • Trekkie
  • **
  • Posts: 16
Re: Setting up Private Nameserver with Cpanel
« Reply #6 on: April 21, 2006, 10:37:36 PM »
So, I have found the following: http://www.premianet.com/english/tutorials/dedi-webmin.phtml

Do these look like the appropriate steps to create a name server, cause i just followed them.

stephan

  • Guest
Re: Setting up Private Nameserver with Cpanel
« Reply #7 on: April 23, 2006, 09:31:28 AM »
I have created a support ticket. The only problem is that the standard turn around time is 24 hours for a single question, and the answers arent very specific... I expected more from the people who claimed to be the #1 in customer support...


Webmin is meant for people who are experienced Linux administration, our support doesn't necessarily cover this. It depends on your definition of "managed hosting" When we hand over the webmin servers they come pre-configured with private nameservers setup already, so as long as you don't make any changes, it will be fine.

If you have made a mistake, please contact support and we can check over it for you. Our managed hosting doesn't have to include this though, managed hosting includes monitoring of your server, security updates to the control panel etc. We set up private nameservers for you as a convenience to get you started, however, if you change the configuration, you can contact support and we can put it back again, although this isn't something we would officially have to do as part of the managed hosting.
« Last Edit: April 23, 2006, 09:36:07 AM by stephan »

Offline thegreekrow

  • Trekkie
  • **
  • Posts: 16
Re: Setting up Private Nameserver with Cpanel
« Reply #8 on: April 23, 2006, 11:53:16 AM »
Well, thats the thing, the name servers were not setup. Which means the config was left to me. I can take care of pretty much any other aspect of my server, but I have never had to deal with nameservers before....
as for as technical support, the answers have been vague and short. If the turn around time is 24 hours, maybe the tech support should answer questions with a little more detail, which would reduce the amount of repeat questions, and thereby reduce turn around time.

Update: So, tried to call tech support during working hours. Got forwarded to a mailbox, which in turn hung up on me while I was trying to leave a message. Yeah, me not so happy. Are you telling me that this wouldnt be an issue if I had cPanel?!
« Last Edit: April 23, 2006, 12:10:52 PM by thegreekrow »

stephan

  • Guest
Re: Setting up Private Nameserver with Cpanel
« Reply #9 on: April 24, 2006, 02:51:30 PM »
Hi,

The turnaround time on average is much less than 24 hours.

The nameservers should always be setup, I apologise if this wasn't done on your server.

As for the mailbox, I guess you could call back, I don't know why you were disconnected because I can't trace the call.

Cpanel is a lot easier to set up and the instructions above are for Cpanel, so in a way yes, it would have been easier, as the instructions are above. We can send you out instructions on creating nameservers on Webmin if you don't have them yet, just e-mail support.

Offline thegreekrow

  • Trekkie
  • **
  • Posts: 16
Re: Setting up Private Nameserver with Cpanel
« Reply #10 on: April 24, 2006, 03:39:52 PM »
Ok, i think i figured out where I screwed up. I was contacting support@lunarpages.com through lunarpages.com/support.php. I just recently called and talked to someone, and I was directed to dedicated@lunarpages.com and dedicated@lunarpages.com. So, I think I was going to the wrong people about the problem, which might have caused the delay. Now im just sitting and waiting for my server to come back up from that massive outage to contact them again and figure out what is going on with my nameservers....

So, note to all: if you pay for a dedicated server, go to dedicated@lunarpages.com =)

Offline tntobey

  • Newbie
  • *
  • Posts: 1
    • Main Lunar Site
Re: Setting up Private Nameserver with Cpanel
« Reply #11 on: December 18, 2008, 02:51:27 PM »
I created a new domain when setting up my account and one thing they left out of the welcome message was the link to manage the domain (Tucows) for this. They did set it up with the same username and password as the customer account. The url is https://manage.opensrs.net. On the Nameservers page scroll to the bottom for "If you want to create or modify a nameserver which is based on {yourdomain.com} click here." If your VPS has only one ip that appears to be fine, so set up ns1.(your ip) and ns2.(your same ip). Then you can get back to the regular domain nameservers page and use your own nameserver for the main domain!

Offline vlad.panainte

  • Spaceship Captain
  • *****
  • Posts: 122
Re: Setting up Private Nameserver with Cpanel
« Reply #12 on: October 12, 2009, 02:05:39 PM »
Hello

If anyone has a domain registered with Norid (norvegian register ) this might be helpful:

Norid will check domains against these requirements at the time of registration and afterwards at regular intervals. Failure to comply with these requirements may result in rejection of the application or deletion of the domain.

The following requirements apply to domains to be registered by Norid:

   1.

      At least two separate name servers
      Every domain must be served by at least two separate name servers, which run on physically separate machines.
   2.

      Consistency between data in the domain name application and response from name servers
      The response from the name servers specified for a domain must include the same name servers as those specified in the application. Note that both the names and the number of name servers must be the same.
   3.

      Authoritative name servers
      All the name servers specified for a domain must respond authoritatively for the domain.
   4.

      Accessible name servers
      Name servers must be permanently connected to the Internet, and must have a permanently assigned (fixed) IP address.
   5.

      Correct e-mail information in the SOA (Start Of Authority) record
      The SOA record for a domain must include a functioning E-mail address for the administrator responsible for the operation of the name server.
   6.

      Consistent serial number in the SOA record
      The serial number in the SOA record must be the same for all the specified name servers.
   7.

      Canonical name on the right-hand side in NS and MX records
      On the right-hand side in an NS record the canonical name must always be used, and not an alias (CNAME).

      On the right-hand side in an MX record the canonical name must always be used, and not an alias (CNAME). The requirement for the canonical name in the MX record can be waived if the specified contact persons for a domain have e-mail addresses outside the domain.
   8.

      No IDN domain names in the host adress
      Host adresses that includes national characters (IDN-names) or their corresponding ACE-version may not be registered in Norid's database.


Thank you!

Offline wilmatan

  • Intergalactic Cowboy
  • *****
  • Posts: 51
Re: Setting up Private Nameserver with Cpanel
« Reply #13 on: May 04, 2011, 06:51:14 AM »
 :yey: :yey: :yey: Really helpful tutorial....thanks for sharing your knowledge...,  :bounce: :bounce:

 

Share |