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.

Shared IP API

Discussion in 'cPanel Developers' started by SBowler, May 7, 2012.

  1. SBowler

    SBowler Registered

    Joined:
    Jun 8, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I am working on a PHP tool to allow technicians to change a cPanel accounts IP address. The issue I am running into is related to getting a good list of IPs and information about them using the APIs. I can get a list of unused dedicated IP addresses easily enough, but the problem I run into is determining the main shared IP on the server. The main IP of the server is not the same as the main shared IP and there seems to be no way to differentiate between a resellers shared IP and the main shared IP. I cannot guarantee that any reseller account is actually assigned to their shared IP if they have one set.

    Does anyone know of a way to determine this information using the APIs?
     
  2. SBowler

    SBowler Registered

    Joined:
    Jun 8, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I think I will be able to check the RDNS of the IP and work with that. If anyone has any other ideas I would be happy to hear them.
     
  3. charsleysa

    charsleysa Active Member

    Joined:
    Jul 18, 2011
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palmerston North, New Zealand
    cPanel Access Level:
    Root Administrator
    Try checking the main IP of root, this is the main shared IP.
     
  4. KostonConsulting

    KostonConsulting Well-Known Member

    Joined:
    Jun 17, 2010
    Messages:
    255
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    San Francisco, CA
    cPanel Access Level:
    Root Administrator
    The main IP is also stored in /etc/wwwacct.conf as ADDR.
     
Loading...

Share This Page