IP Configuration Issues (NAT) After Changes
Hi Guys
I have had to change our servers external and internal IPs. (We use NAT) We only have a handful of sites - 1 on a dedicated IP and 4 on a shared IP.
When I moved the first of the shared IP domains, cPanel decided that the IP was dedicated to that domain and now I can't migrate the rest of the sites to the shared IP because it no longer appears as being "available".
How do I tell cPanel that the IP is not dedicated that domain, so that I can give the other domains an IP address?
-
I played around with IP migration wizard and "change multiple sites IP addresses" and it looks correct now. 0 -
I'm glad you were able to get that working! 0 -
Only problem now is none of the sites will load. When I click the "Validate" button on the "Show or Delete Current IP Addresses" page I get "Not Routable" for both IPs. Yet at least one of the sites was working previously. 0 -
Does the Apache configuration also have the correct IP for the domains? 0 -
Does the Apache configuration also have the correct IP for the domains?
It looked a bit messed up, so I ran /usr/local/cpanel/scripts/rebuildhttpdconf and it looks correct now. I think the problem is related to NAT. There are 2 local IPs - 10.x.x.8 - Main Shared IP 10.x.x.7 - Dedicated to a single domain When I enter their External IPs via the "Show or Delete Current IP Addresses", if I click "Validate", they both resolve to external IP of the Dedicated domain, it's like cPanel can't see the primary IP address. Yet, the public IPs are both resolving to the server. If I run /usr/local/cpanel/scripts/build_cpnat it points both local IPs to the same external IP (The supposedly dedicated one) 10.x.x.8 -> xxx.xxx.xxx.1 10.x.x.7 -> xxx.xxx.xxx.1 When I test the 2 Public IPs ... xxx.xxx.xxx.2 - (Main Shared IP) -> I get cPanel's "Sorry" page - /cgi-sys/defaultwebpage.cgi xxx.xxx.xxx.1 - (Dedicated IP) -> I get the wrong site. Also cPanel refuses to run when I try to license it to the main shared IP, so I had to change the license to the Dedicated IP to get it to work.0 -
The license server will be looking for requests over the main IP of the server that makes outbound requests. You can run this command to confirm what that IP address is on the system: curl -w '\n' -s http://myip.cpanel.net/v1.0/
If that isn't the IP you want, you'd need to adjust the network settings in the operating system itself to change the order. Running this:cat /var/cpanel/cpnat
will show you how the NAT is currently configured. You can run:/scripts/build_cpnat
to attempt to rebuild that NAT configuration.0 -
cat /var/cpanel/cpnat Gives the desired configuration, but that's only because I've entered it that way via the "Show or Delete Current IP Addresses" screen. If I run /scripts/build_cpnat, it points both internal IPs to the same external IP - (the supposedly Dedicated one), it's like cPanel can't see the primary IP address. Yet, the public IPs are both resolving to the server. 0 -
That sounds like the root of the issue - cPanel is only able to work with a 1:1 NAT configuration, meaning that each private IP address can only point to one public IP address. You'll want to speak with the host about that configuration to have them check things as cPanel doesn't set up that networking, but just reads it from the operating system. 0 -
Thank you. I'll talk to the people who set up the NAT routing. 0 -
Yes, they had to set up a special rule for each IP to report itself as the outbound IP rather than just a single default server IP. 0
Please sign in to leave a comment.
Comments
11 comments