The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IP address related links in WHM throwing errors

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

  1. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    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,146
    Likes Received:
    34
    Trophy Points:
    48
    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
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    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.
     
  4. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
  5. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    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. cPTerrance

    cPTerrance *nix Technical Analyst II / Migrations Specialist
    Staff Member

    Joined:
    Jul 9, 2015
    Messages:
    72
    Likes Received:
    8
    Trophy Points:
    8
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Twitter:
    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