Creating Nameservers behind NAT

fgjr

Registered
Oct 31, 2014
2
0
1
cPanel Access Level
Root Administrator
Hi All...

Please forgive me as I'm a little new. I've owned plenty of cPanel / WHM dedicated servers in the past, but they have all been at data centers. This is the first time I'm creating a new dedicated server of my own and doing it behind a NAT.

My question has to do with name servers and using NAT. I've built a CentOS server and used the image provided by cPanel with cPanel/WHM built into the image. I've started configuring the server from within WHM and I've gotten to step 4 where you specify name servers. Should I be using private name servers ( DNS servers ) that I have in my private LAN that route to outside DNS servers when local lookup of domains fail, or do I still need to create outside world public name servers and specify those within Step 4?

I really appreciate any help someone can give me.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
or do I still need to create outside world public name servers and specify those within Step 4?
Hello :)

Yes, you should create public name servers at your registrar using public IP addresses and specify those on step four.

Thank you.
 

fgjr

Registered
Oct 31, 2014
2
0
1
cPanel Access Level
Root Administrator
Hello :)

Yes, you should create public name servers at your registrar using public IP addresses and specify those on step four.

Thank you.
Thanks cPanelMichael for your answer. A quick follow up question...

Do I then need to take those public IP addresses and have them 1:1 Nat back to my server behind the firewall? I'm assuming the answer to this is yes but want to make sure :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

You should add those IP addresses directly to your server and configure any custom network/firewall configurations as needed. Per our documentation:

When you install cPanel & WHM, the installer will detect whether your server is on a NAT-configured network. If the installer detects a NAT-configured network, your server will configure itself for NAT mode and attempt to automatically map local IP addresses to public IP addresses.

You can find the full document at:

1:1 NAT

Thank you.