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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED NAT messed up

Discussion in 'Bind / DNS / Nameserver Issues' started by tgv, Jan 17, 2017.

Tags:
  1. tgv

    tgv Member

    Joined:
    May 29, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    I'm facing a problem that happened to others but has no published solution: all newly created sites (accounts) get redirected to /cgi-sys/defaultwebpage.cgi, because their VirtualHost directives in httpd.conf are pointing to the external IP.

    /var/cpanel/userdata/{username}/{domainname} files also contain the external IP.

    /var/cpanel/cpnat file and "Show or delete current IP addresses" table both look perfectly correct.

    /scripts/rebuildhttpdconf does not help.

    I am able to fix the failing accounts using "IP Migration wizard" but that doesn't sound like a healthy solution.

    This plague only affects the shared IP by the way, new accounts created on dedicated IPs are OK.

    Background: It's a fresh Centos 7.3 on AWS EC2, with WHM 60.0 build 34. I've migrated a few dozen accounts on it, along with IP addresses, and ran "IP Migration wizard" a few times, initially using a public (external) IP before realising I should use private one; perhaps something got stuck at that point.

    Thanks in advance :)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here and we will update this thread with the outcome.

    Thank you.
     
  3. tgv

    tgv Member

    Joined:
    May 29, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Thanks Michael,

    It's ticket #8141813
     
  4. tgv

    tgv Member

    Joined:
    May 29, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Okay, I've been told different things by the support guy, but eventually figured it out by accident.

    The critical thing is that one should enter and save (or resave) Basic WHM Setup > Shared Virtual Host IPv4 Address AFTER the public IP is associated with private and bound (validated) via IP functions > Show or delete current IP addresses.

    This way cPanel saves correct private IP wherever it supposed to be saved and shows the message:

    Modifying “Shared Virtual Host IPv4 Address” from “13.54.81.88” to “10.0.0.156”.

    That's it, thanks everyone, please like and share :)
     
  5. tgv

    tgv Member

    Joined:
    May 29, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Oh and just got an update that the private IP should be present as ADDR variable in the /etc/wwwacct.conf



     
Loading...

Share This Page