IP address related links in WHM throwing errors
Apparently, the new server on which we were asked to upload a client site is on a NAT network. Or, perhaps that's relevant. But, after getting repeated 'Bad request' from a browser when trying to load the site, we changed the IP address of the site to the server's main, shared IP (instead of the second public IP which was shown as being NATted).
Ever since, 'List Accounts' link in WHM fails to load the list of account on the server and shows an error message about a fatal error. Clicking on the message brings up a window with the following:
Can't use an undefined value as a HASH reference at /usr/local/cpanel/Cpanel/NAT/Object.pm line 54.
at /usr/local/cpanel/Cpanel/NAT/Object.pm line 54.
Cpanel::NAT::Object::load_file(Cpanel::NAT::Object=HASH(0x43b6580)) called at /usr/local/cpanel/Cpanel/NAT/Object.pm line 27
Cpanel::NAT::Object::new("Cpanel::NAT::Object") called at /usr/local/cpanel/Cpanel/NAT.pm line 20
Cpanel::NAT::cpnat() called at /usr/local/cpanel/Cpanel/NAT.pm line 29
Cpanel::NAT::get_public_ip("180.179.58.114") called at whostmgr/bin/whostmgr4.pl line 380
main::listaccts() called at whostmgr/bin/whostmgr4.pl line 154
All the IP address related links in WHM bring up the same error. Meanwhile, the site continues to show 'Bad request' in the browser. I will be thankful if someone could help me with some suggestions for a fix.
All the IP address related links in WHM bring up the same error. Meanwhile, the site continues to show 'Bad request' in the browser. I will be thankful if someone could help me with some suggestions for a fix.
-
Hello, I think your /var/cpanel/cpnat file is corrupted and may be due to that you are getting this issues, Can you please try to rebuild it with following command. /scripts/build_cpnat0 -
Hello :) Yes, please check to see if the following file exists: /var/cpanel/cpnat It should have been created during the initial setup of the server, but if not, you can try generating it via: /scripts/build_cpnat
Ensure the account is assigned the private IP address after 1:1 NAT is enabled. Thank you.0 -
Ensure the account is assigned the private IP address after 1:1 NAT is enabled.
I just noticed this and it seems like an important tip. Does this mean that, on a NAT system, one has to assign each cPanel account the private IP address rather than the public IP/shared main IP of the server?0 -
Hello, When you add the IP Address(es) via the interface within WHM; if you are using 1:1 NAT you should add the Internal IP Address within WHM, cPanel will automatically make Apache use the appropriate IP from there 0
Please sign in to leave a comment.
Comments
5 comments