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.

Cpanel with DHCP

Discussion in 'General Discussion' started by Sunrex, May 3, 2010.

  1. Sunrex

    Sunrex Member

    Joined:
    Apr 28, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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."
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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? :confused:

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

    Sunrex Member

    Joined:
    Apr 28, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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. cPanelJamyn

    cPanelJamyn Social Engineer
    Staff Member

    Joined:
    Jan 29, 2009
    Messages:
    105
    Likes Received:
    2
    Trophy Points:
    0
    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.

    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. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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]
     
  8. Sunrex

    Sunrex Member

    Joined:
    Apr 28, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    [/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. octavc

    octavc Member

    Joined:
    Apr 11, 2010
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    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
     
Loading...

Share This Page