Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2009
    Posts
    16

    Default Limiting IP Based Accounts for Resellers.

    We would like to pose limits on resellers based on whether an account is IP based or Name-based.

    Example.

    A reseller can created 20 accounts total.
    5 IP based accounts and 15 name based (Shared IP).

    1. Is this possible with WHM/CPanel? If yes then how is it done.
    2. If yes then what back-end files are involved? If we want to limit a reseller to X number of Dedicated IP's which backend file contains that setting.

    Any help would be appreciated.

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by dwinans View Post
    We would like to pose limits on resellers based on whether an account is IP based or Name-based.

    Example.

    A reseller can created 20 accounts total.
    5 IP based accounts and 15 name based (Shared IP).

    1. Is this possible with WHM/CPanel? If yes then how is it done.
    2. If yes then what back-end files are involved? If we want to limit a reseller to X number of Dedicated IP's which backend file contains that setting.

    Any help would be appreciated.
    In reseller center, you can limit the reseller to how many total accounts they can have. You can then use "Manage IP Delegation" to assign the reseller specific IPs they can use. The reseller can only create accounts with dedicated IPs as long as they have IPs assigned to their account that are not yet assigned as dedicated IPs.

    Any particular reason you wanted to know which back-end files were involved? Were you looking to automate this?

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2009
    Posts
    16

    Default

    Thank you very much for the reply. So for example if we want the reseller to have the ability to create 20 accounts over all. 10 IP based and 10 Name-Based, we would allow them to create 20 accounts and assign them 10 dedicated IP's through IP delegation. correct?

    I'm not fond of this approach and would like to avoid it, if possible. If it is the best option we will probably run with it. The draw back of this method I see is below.

    We set a reseller up with the ability to create 20 accounts.
    We allow them to create 10 IP based accounts and we specificly assign them 10 IP's.
    If we specificly delgate those 10 IP's to this reseller, and they never end up using all of them then we've just wasted IP space.

    For the above reason I'd like to see an IP pool based solution. But, I don't believe there is one with WHM.

    The only way I see to do it differently is to Specify the number of accounts the reseller can create, then also specify the packages a reseller can use to create accounts and then limit the number of accounts on those packages.

    The above is not a great solution either considering we want to give the reseller the ability to create their own packages, so out of the two if we have to use one we would go with the solution that you've proposed.

    To answer your second question, we are definatley looking to automate things and that is why I would like to know which back end files are involved.

    What I'm looking for here are the backend files dealing with IP delegation. IE if I setup ResellerA to be able to use 10 specific IP's, what backend files are involved in keeping those IP's reserved for that reseller.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by dwinans View Post
    Thank you very much for the reply. So for example if we want the reseller to have the ability to create 20 accounts over all. 10 IP based and 10 Name-Based, we would allow them to create 20 accounts and assign them 10 dedicated IP's through IP delegation. correct?
    cPanel/WHM does not support the creation of IP-based accounts. All accounts need to have either a domain or subdomain assigned to them.

    Quote Originally Posted by dwinans View Post
    I'm not fond of this approach and would like to avoid it, if possible. If it is the best option we will probably run with it. The draw back of this method I see is below.

    We set a reseller up with the ability to create 20 accounts.
    We allow them to create 10 IP based accounts and we specificly assign them 10 IP's.
    If we specificly delgate those 10 IP's to this reseller, and they never end up using all of them then we've just wasted IP space.

    For the above reason I'd like to see an IP pool based solution. But, I don't believe there is one with WHM.

    The only way I see to do it differently is to Specify the number of accounts the reseller can create, then also specify the packages a reseller can use to create accounts and then limit the number of accounts on those packages.

    The above is not a great solution either considering we want to give the reseller the ability to create their own packages, so out of the two if we have to use one we would go with the solution that you've proposed.
    Perhaps you could implement your own IP-pool solution. One possibility is assigning them 1 IP they can use for a dedicated account. Then create /scripts/postwwwacct (a hook for new account creations on the server) to add an additional IP to their account (if you want to let them eventually create another account with a dedicated IP) when they create an account with a dedicated IP. You can create /scripts/postkillacct (a hook for account terminations on the server) to keep track of the IPs no longer being used that can be removed from that reseller's block of IPs. Documentation for creating /scripts/postwwwacct and /scripts/postkillacct is available at:

    ScriptHooks < AllDocumentation < TWiki

    The above algorithm doesn't make the most efficient use of IP addresses, so you may wish to adjust the algorithm as you see fit for your needs.

    Quote Originally Posted by dwinans View Post
    To answer your second question, we are definatley looking to automate things and that is why I would like to know which back end files are involved.

    What I'm looking for here are the backend files dealing with IP delegation. IE if I setup ResellerA to be able to use 10 specific IP's, what backend files are involved in keeping those IP's reserved for that reseller.
    /var/cpanel/dips/RESELLER

    Where RESELLER represents the cPanel username of a reseller. This file will contain 1 IP per line, where the IP has been delegated to that reseller. Resellers with no delegated IPs will not have a file in this directory.

Similar Threads & Tags
Similar threads

  1. Limiting resellers and also allowing overselling
    By optize in forum New User Questions
    Replies: 13
    Last Post: 07-30-2009, 03:38 PM
  2. Resellers W/o IP Based Account Creation Rights
    By anup123 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-23-2005, 10:44 AM
  3. Limiting Addon Domains For Resellers
    By hostingmetro in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-24-2004, 08:53 PM
  4. dedicated: space limiting with resellers
    By punka in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-20-2004, 05:12 AM
  5. Limiting reseller accounts
    By Omar in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-10-2002, 11:14 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube