Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

IP address related links in WHM throwing errors

Discussion in 'Bind/DNS/Nameserver' started by meeven, Jul 20, 2015.

  1. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    168
    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:

    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.
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    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.

    Code:
    /scripts/build_cpnat
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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:

    Code:
    /scripts/build_cpnat
    Ensure the account is assigned the private IP address after 1:1 NAT is enabled.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    168
  5. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    168
    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?
     
  6. TerranceR

    TerranceR Well-Known Member

    Joined:
    Jul 9, 2015
    Messages:
    74
    Likes Received:
    10
    Trophy Points:
    83
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice