Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Nov 2009
    Posts
    13

    Lightbulb Change Site IP Address Using PHP or SSH

    Hello!

    I would like to know the followings

    1. How to change any website IP address using SSH command may i know that command?

    2. How can i do that using XML-API or anyother PHP code. Please guide to change site IP address using php code in this case i would like to know 2 things specialy.
    i. How to load in drop down or show delegates IP of any specific Reseller.
    ii. How to assign any specific IP to any domain (same way root has Change Site IP address)

    The aim of the script is to provide resellers to assign dedicated IPs to their clients. Thanks for reading post looking forward for positive response.

    Best Regards
    Rao

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default

    Hi Raonaveed,

    IP assignment to domains and IP delegation to resellers are both complex tasks. And for that reason, it's probably best that your resellers use the WHM features as they are.

    Details for xml-api:

    1) listips. The reseller will need 'all root' reseller privileges to list the IP pool.

    2) setsiteip. The reseller will need all root privileges to assign an IP to a domain.

    3) There isn't a function to list delegated IPs for a particular reseller.

    4) There isn't a function to manage delegated IPs for a particular reseller.

    5) There isn't a function to list just domain and ip assignment. There is accountsummary, which will list all information for a particular account.

    Details for command line:

    1) you can find a list of IPs delegated to a particular reseller at:
    /var/cpanel/dips/$reseller_name

    2) there isn't a command line script to manage IP delegation. It is not advisable to modify /var/cpanel/dips/$reseller_name

    3) there isn't a command line script to manage a domains ip. Changing the domain IP does stuff with Apache and your DNS solution (ie, Bind). It's not as simple as changing a text file.

    That being said, I'm would think that the best solution would be to implement a WHM Plugin. It should be feasible to create one that could perform the functionality that you desire. The Plugin would need to:

    1) Enforce a (custom) ACL for your resellers.

    2) Utilize the xml-api calls that are available (listips, setsiteip, accountsummary)

    3) Read /var/cpanel/dips/$reseller_name, and /etc/domainips to display IP delegation/assignment

    Best Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

Similar Threads & Tags
Similar threads

  1. I lose dedicated IP address after Change Site's IP Address
    By asiansexynine in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-26-2010, 11:52 AM
  2. Change Site's IP Address
    By meeti in forum New User Questions
    Replies: 4
    Last Post: 08-22-2008, 07:54 AM
  3. Change Site's IP Address
    By KevinAce in forum cPanel and WHM Discussions
    Replies: 23
    Last Post: 02-27-2004, 06:06 PM
  4. Change Site IP address
    By neophyte in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-26-2002, 11:46 PM
  5. Change Site's IP Address
    By bhaputi in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-31-2002, 09:00 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube