Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    48

    Default Multiple IPs and confusion between external/internal

    The situation one server with 2 ips:
    Internal IP 10.0.0.27 points to 74.x.x.x
    Internal IP 10.0.0.33 points to 70.x.x.x

    eth0 is .27, eth0:1 is .33

    cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
    REDHAT Enterprise 5.2 i686 standard on cp1


    Originally we only had the first IP which was hosting all of our sites, we have since added the 2nd IP address which is taking over all new accounts (this is how we want it).

    I added the internal address to the server pool and specified it as the Main Shared Virtual Host IP under Edit Setup. I have adjusted all of the DNS templates to point to 70.x.x.x

    Issues that arise:
    When attempting to move a site from the old IP to the new IP (as we have to do in some situations) using "Change a site's IP address" adjusts the DNS entries as well to point to 10.0.0.33, making the site unreachable. (I just tried adding the external IP address and setting that as main default, but I got the impression after the first site I checked had lost the ability to get assigned to any IP address and disappeared from the IP usage pool that that was a mistake).

    Accounts cannot have a domain on one IP and an alias on another.

    Accounts that are assigned to an IP which isn't coordinated with their DNS (eg, 10.0.0.27 with dns of 70.x)will have their websites replaced by the first account listed in httpd.conf with the IP that the DNS references.

    The server seems to be confused/doesn't know the difference between the external and internal addresses. I assume that it is because of my configuration, but am at a loss as to how to fix these issues.

    Please advise.

  2. #2
    Member
    Join Date
    Aug 2008
    Posts
    48

    Default

    Bumping:

    The main problem here is that when an account is assigned to the original IP address and the DNS is pointing to the new IP address, a different client's website shows up. It's always the first site listed in httpd.conf that is assigned to the IP the aforementioned site is pointing to.

  3. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    To help clarify my understanding, are you needing to update all existing accounts or domains that were on the older IP address to now use to the newer IP address, or are you needing some accounts or domains to (intentionally) remain using the older IP address?

    It may be possible to manually update or modify the configuration, but what to change varies greatly depending on the existing situation and what the specific requirements are.

  4. #4
    Member
    Join Date
    Oct 2009
    Posts
    15

    Default

    you need not do anything from your end, just tell your host provider to do natting properly. it is their mistake.

  5. #5
    Member
    Join Date
    Aug 2008
    Posts
    48

    Default

    Quote Originally Posted by cPanelDon View Post
    To help clarify my understanding, are you needing to update all existing accounts or domains that were on the older IP address to now use to the newer IP address
    No.

    Quote Originally Posted by cPanelDon View Post
    or are you needing some accounts or domains to (intentionally) remain using the older IP address?
    Yes, we've left several hundred accounts on the original IP address which is as desired. All of those work flawlessly.


    The situation occurs when an account is assigned to the original IP but the DNS entry points to the new IP. This is usually only a temporary situation as it should be, but clients get pissed off because somebody elses website is being displayed at their domain.

    Example: Account A is created, 1 day before the new IP address of .33 was set as the default shared address, giving it an assigned IP of .27. 1 day after the .33 address is set as default, a support rep gets around to setting the DNS entry of Account A and points it to .33. He doesn't know that the site is assigned to .27 in WHM. He looks at the page and sees Account B's website, since account B is the first site listed in httpd.conf assigned to .33. While it is only a temporary inconvenience for us, we lose a bit of credibility with clients because of it. In this situation I would prefer an error page or almost anything other than another accounts website to appear.

  6. #6
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    This should be relatively easy to workaround, at least for future DNS changes.

    If neither IP is solely a dedicated IP for any one account, the following should work. What I would do is ensure there is a default virtual host in-place for both IP addresses (instead of just one for current main shared IP); this is possible through the use of a basic virtual host entry such as the example detailed below, placed in httpd.conf before all other account virtual hosts.

    The easiest way to implement this may be to add the custom virtual host into an Apache configuration include file, such as the following:
    /usr/local/apache/conf/includes/pre_virtualhost_global.conf

    If your Apache configuration "httpd.conf" file already has an entry similar to one of these then it should only be necessary to add the one that does not yet exist (preferrably copying and pasting the existing default virtual host and only changing the IP address):

    Code:
    <VirtualHost 10.0.0.27:80>
        ServerName server.domain.tld
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin root@server.domain.tld
    </VirtualHost>
    
    <VirtualHost 10.0.0.33:80>
        ServerName server.domain.tld
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin root@server.domain.tld
    </VirtualHost>
    After updating an include file, as a precaution I would test to verify Apache can restart successfully.

    For additional information about editing the include files via WHM (or via SSH), and for more EasyApache-related documentation about customizing the "httpd.conf" file, please refer to the following documentation links:
    IncludeEditor < AllDocumentation/WHMDocs < TWiki
    Apache & cPanel/WHM

Similar Threads & Tags
Similar threads

  1. Internal or External IP???
    By VPSExpert in forum New User Questions
    Replies: 3
    Last Post: 01-18-2011, 11:04 AM
  2. Outbound SMTP on Multiple External IPs
    By u195819 in forum E-mail Discussions
    Replies: 0
    Last Post: 08-15-2009, 05:18 PM
  3. Multiple Shared IPs *without having to use multiple reseller accounts?
    By thedevilman in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-20-2008, 08:43 PM
  4. external OR internal?
    By tyuuu in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-05-2006, 11:27 PM
  5. Main Shared Virtual Host IP, External or Internal?
    By RedHatSolutions in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-05-2004, 06:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube