I want a shared IP (not the server IP) to be shared among many Resellers

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » DirectAdmin » Custom Scripting

I want a shared IP (not the server IP) to be shared among many ResellersLast Modified: Feb 7, 2020, 5:35 pm
"global" IP type for future DA implementation:

At the moment, only the server IP can be shared to many Resellers.
Shared IPs can only "officially" exist in one Reseller at a time.

However, there might be a case where you don't want to give your Resellers the server IP, and only let them all share 1 "shared IP" between them.


  • - Server IP
  • - Shared IP
  • - Additional Shared IP (Optional)

  1. Ensure the shared IP has been created in the

    Admin Level -> IP Manager

           Assign it to the "admin" account on that page, then go to:

    admin -> Reseller Level -> IP Manager

           and ensure the IP is set as "shared".  Do the same for if you want to add multiple shared IPs.
  2. Now we want all newly created Resellers to have the server IP swapped with this shared IP upon their creation.
    To do this, create the following script


    and in it, add the code:


    function add()
           echo $1 >> ${IPL}

    if [ -s ${IPL} ]; then
           STR="perl -pi -e \'s/^${SERVER}\\$/${SHARED}/\' ${IPL}"
           eval ${STR}
           echo "Swapped server IP ${SERVER} with shared IP ${SHARED} for $username";

    exit 0;

  3. Be sure to chmod the script to 755:


  4. Lastly, when you create your Reseller, just make sure you assign them to the server IP, and it will be swapped with the shared IP for their control.
    Note that "add"ing more IPs ( will always be added, based on how that's scripted, regardless if the account was created on the server IP or not.  More coding would be needed if you need other scenarios.

Note that their User Level domain will still be set to the server IP. More perl regex calls would be needed to accomplish that (user.conf, user.ip_list, httpd.confm domains/domain.com.conf, domains/domain.com.ip_list, /var/named/domain.com.db)

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST