Assigning Name server IPs manually via SSH

Currently cPanel will start with eth0 and work through eth1 when you assign nameservers to your IPs via WHM. Unfortunately, this will automatically choose your management IP range first, which of course are non-routable. There are two work-arounds for this:

1: Create a fake nameserver record on your private IPs, and add an A record for that nameserver to your DNS. This is the fastest option, but not the best.

2: SSH to your server and edit /etc/nameserverips manually. An example file is blelow:

10.x.x.x=0
128.177.x.x1=ns1.my_cpanel_nameserver.com
128.177.x.x2=ns2.my_cpanel_nameserver.com
128.177.x.x3=0
128.177.x.x4=0
128.177.x.x5=0

Just replace the '0' after the '=' with your nameserver name. In this example, the first IP (10.x.x.x) is the management IP, and not used for nameservers. The next two IPs are public and assigned to two nameservers. The last three are public and not in use.
  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

How do I backup my entire site in cPanel?

Entire accounts can be backed up by doing the following: 1. Log into your cPanel and click the...

Error 550 – “The recipient cannot be verified”

On servers running cPanel, you may find that mail sent to valid users it bounced back by your...

Ports that must be open to run cPanel behind a firewall / IPTables

20 ftp tcp inbound/outbound21 ftp tcp,udp inbound/outbound22 ssh tcp inbound25 smtp tcp...

Quotas in WHM

ssh into the server then issue:/sbin/quotaoff -av/sbin/quotacheck -augvm/sbin/quotaon -av

Running exim on a different port

Log into WHM and click on "Service Manager" under the Service Configuration grouping....