Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Apr 2010
    Posts
    15

    Default Cpanel with DHCP

    Hello,

    I'm intending on getting a business connection with one static IP. My intention is to have the router handle the static IP and use DHCP with port forwarding for the cpanel server.

    Will cpanel work correctly like this, and will it display the static IP in the client cpanel server information area, or the DHCP?. I'm intending on using a VPS to handle the other DNS IP needed.

    Thanks!.

  2. #2
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,066

    Default Internal IP address must be static as well

    The only way this will work is if the server is assigned a static internal IP address in the router's configuration. The MAC address for the server's network interface needs to be assigned a static internal IP address. cPanel is not designed to work in a DHCP environment. It depends on its IP address(es) being static.

    cPanel is not "aware" of NAT, which is what will be used in your situation. It is not aware of the concept of having "internal" and "external" IP addresses. While many users do use cPanel successfully in a NAT environment, it is not officially supported.

    To use NAT successfully, the accounts must be configured for the internal IP address in cPanel. However, the DNS zones must contain the external IP address. Create an account using the internal IP address, then manually edit the DNS zone to contain the external IP address instead of the internal one. There is no provision to make this change automatically at account creation time, which is a result of cPanel not being "NAT-aware."
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  3. #3
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by Sunrex View Post
    I'm intending on getting a business connection with one static IP. My intention is to have the router handle the static IP and use DHCP with port forwarding for the cpanel server.
    Running web servers from most cable modem and DSL accounts is prohibited by the service agreements of most internet providers and that includes even "business" accounts in many cases. Ignoring all of that, there is a lot of technical reasons these types of configurations are generally a bad idea as well and in most instances would be much better off (and probably cheaper too) hosting your server in a data center location somewhere where there is much more bandwidth resources.

    Now regarding your question and issues more directly though ....

    NAT Translation
    While you can technically put Cpanel behind a NAT translating router or firewall, it is a management nightmare and you will create a lot more work and headaches for yourself doing this. Not recommended.

    DHCP IP Allocation
    This is something that is NOT possible. All server processes whether that be Cpanel or any other server out there has to have a fixed connectivity point and cannot have it's own IPs DHCP allocated. What you would need to do if you ignored everything I wrote earlier is setup your own personal computers to get IPs by DHCP and then reserve a "fixed" range from the local subnet for direct assignment (all routers have this feature) and then give your server machine a fixed IP address to the router.



    Will cpanel work correctly like this, and will it display the static IP in the client cpanel server information area, or the DHCP?. I'm intending on using a VPS to handle the other DNS IP needed.

    Thanks!.[/QUOTE]

  4. #4
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Will cpanel work correctly like this, and will it display the static IP in the client cpanel server information area, or the DHCP?. I'm intending on using a VPS to handle the other DNS IP needed.
    If you are planning on setting up a VPS somewhere to handle the DNS then why not just use the VPS as your Cpanel server?

    (Cpanel has it's own internal DNS servers incidentally)

  5. #5
    Member
    Join Date
    Apr 2010
    Posts
    15

    Default

    Quote Originally Posted by Spiral View Post
    If you are planning on setting up a VPS somewhere to handle the DNS then why not just use the VPS as your Cpanel server?

    (Cpanel has it's own internal DNS servers incidentally)
    Why do that, when I would be limited by the datacenters monthly transfer?. I would rather use my own connection . Cheaper in the long run for the amount of transfer I'm getting anyway.

    It's pretty interesting everyone here is so against the idea of people hosting from home, even on a business connection with a static IP.

    Ok, back to my question:

    So if I setup a internal IP for the server - 192.168.0.12 for instance (Which is already setup, and marked as static for the server). Then Cpanel should work?.

    So if I forward all the ports cpanel requires to that static IP, there should be no trouble?. Just trying to confirm.

    I'm not a newbie at networking, but I'm not sure if cpanel will detect and use the internal IP as the IP registered to it or not. If so, then that probably wont work out - but if it communicates with the cpanel licensing server using the static IP I don't see a huge issue.

    Thanks for the support everyone, it's appreciated!.

  6. #6
    cPanel Staff cPanelJamyn's Avatar
    Join Date
    Jan 2009
    Posts
    59

    Default

    Quote Originally Posted by Sunrex View Post
    So if I setup a internal IP for the server - 192.168.0.12 for instance (Which is already setup, and marked as static for the server). Then Cpanel should work?.
    Although we don't currently support that configuration - to answer your question, yes - people have successfully configured their server to work with a static NATed IP. Most of the support issues that arise in that situation are due to failure to port forward, incorrect routing to/from the network, and similar.

    Quote Originally Posted by Sunrex View Post
    So if I forward all the ports cpanel requires to that static IP, there should be no trouble?. Just trying to confirm.
    It can work, yes. There's no guarantee of "no trouble" of course, as some of the variables are outside our control (we don't maintain the routing or nat for example). But, I've seen people do this successfully in the past. The internal IP should be listed in /etc/wwwaccts.conf in this case, so new accounts get assigned the internal IP. If you've already setup accounts prior to configuring the static internal IP, you'll have to change over their IPs of course. Otherwise, apache will get a little confused and serve up the wrong vhost(s), and other problems can arise.

  7. #7
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by Sunrex View Post
    Why do that, when I would be limited by the datacenters monthly transfer?. I would rather use my own connection . Cheaper in the long run for the amount of transfer I'm getting anyway.
    That is entirely a contradictory statement ....

    A) ISP account transfer limits are actually MUCH LOWER than typical average data center limits and I don't mean
    just service agreements but rather technical barriers as well as you
    are going to run into physical network capability limits as well.

    B) It is very nearly impossible for you to come anywhere close to the transfer limits of most data centers from a typical single home ISP account of any kind even if you were deliberately trying to do so running your computer at 100% network loads 24 hours a day, 7 days a week.

    If you think you can exceed the multi-terrabyte transfer allowances typical of most data centers these days then you are in serious need of multiple hosting servers anyway because you are talking about hellish high network loads and would be beating the heck any given machine.

    What you just said is actually more of a reason TO USE a data center!

    I'm not a newbie at networking, but I'm not sure if cpanel will detect and use the internal IP as the IP registered to it or not. If so, then that probably wont work out - but if it communicates with the cpanel licensing server using the static IP I don't see a huge issue.
    Licensing is not the issue --- it would see your external IP address.

    The issue is Apache responds to traffic by both name and IP mapping as does most every process on a hosting server and all of that is is going to be mismatched from what the server needs to respond to (internal lan) and what the world would use to reach the server (external wan) and Cpanel presently has no method of remapping those other than a lot of manual edits and configuration patches and even then keeping things in sync after that point gets even further complicated.

    Thanks for the support everyone, it's appreciated!.[/QUOTE]

  8. #8
    Member
    Join Date
    Apr 2010
    Posts
    15

    Default

    Quote Originally Posted by Spiral View Post
    That is entirely a contradictory statement ....

    A) ISP account transfer limits are actually MUCH LOWER than typical average data center limits and I don't mean
    just service agreements but rather technical barriers as well as you
    are going to run into physical network capability limits as well.

    B) It is very nearly impossible for you to come anywhere close to the transfer limits of most data centers from a typical single home ISP account of any kind even if you were deliberately trying to do so running your computer at 100% network loads 24 hours a day, 7 days a week.

    If you think you can exceed the multi-terrabyte transfer allowances typical of most data centers these days then you are in serious need of multiple hosting servers anyway because you are talking about hellish high network loads and would be beating the heck any given machine.

    What you just said is actually more of a reason TO USE a data center!


    Licensing is not the issue --- it would see your external IP address.

    The issue is Apache responds to traffic by both name and IP mapping as does most every process on a hosting server and all of that is is going to be mismatched from what the server needs to respond to (internal lan) and what the world would use to reach the server (external wan) and Cpanel presently has no method of remapping those other than a lot of manual edits and configuration patches and even then keeping things in sync after that point gets even further complicated.

    Thanks for the support everyone, it's appreciated!.
    [/QUOTE]

    When I said limited by the datacenters monthly transfer I meant per server. I have upgraded my network as intended and setup cpanel, increasing my total monthly transfer 5-7x what it was with the datacenter.

    Cpanel actually works almost 100% when setup in NAT, other then needing to manually edit the DNS zone of any new accounts anyway. So far no issues.

  9. #9
    Member
    Join Date
    Apr 2010
    Posts
    7

    Default

    Quote Originally Posted by Sunrex View Post

    So if I setup a internal IP for the server - 192.168.0.12 for instance (Which is already setup, and marked as static for the server). Then Cpanel should work?.

    So if I forward all the ports cpanel requires to that static IP, there should be no trouble?. Just trying to confirm.

    I'm not a newbie at networking, but I'm not sure if cpanel will detect and use the internal IP as the IP registered to it or not. If so, then that probably wont work out - but if it communicates with the cpanel licensing server using the static IP I don't see a huge issue.

    Thanks for the support everyone, it's appreciated!.
    It will work, but it creates some issues I faced using this method;
    1) It will create dns zones, with your internal IP something like domain IN A 192.... which you must edit after setting up every new account.
    Apart from this problem with dns zones, everything else worked alright (emails,, except the subdomains, which I must make some command line editing.)
    Don't try to give your server the external IP as a second address, because all your sites will go to the default Cpanel page.

    I don't know your exact situation there, but I would advise you to consider these 2 more options:

    1 )Turn the server into a router, giving it so the external IP address and overcoming the dns zone problem.
    2) I found some routers -(the expensive ones) which replicate the external IP address to a computer in the LAN, if you assign ALL the ports to that server from 1 to 65535

Similar Threads & Tags
Similar threads

  1. how to setup server to system use ip address and disable dhcp
    By mbd5882 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-15-2007, 09:27 AM
  2. FTP Backup & DHCP
    By ajralston in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-10-2003, 05:35 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube