Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

WHM on AWS and networking

Discussion in 'Bind/DNS/Nameserver' started by tomdchi, May 16, 2018.

  1. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    130
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider
    I have WHM installed on AWS and the networking is configured as DHCP.

    /etc/sysconfig/network-scripts/ifcfg-eth0 has

    Code:
    # Created by cloud-init on instance boot automatically, do not edit.
    #
    BOOTPROTO=dhcp
    DEVICE=eth0
    HWADDR=12:fd:fc:7c:55:cc
    ONBOOT=yes
    TYPE=Ethernet
    USERCTL=no
    
    I tried editing this file and setting the static IP assigned but it reverted back to DHCP on reboot. Is there a way to get this to use a static IP or should I just leave it alone? Everything seems to be working OK but I would prefer to have this as static.
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    267
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You can edit the configuration as you have mentioned , instead you will need to assign an elastic IP which will be the actual IP of your instance. The reason to assign elastic IP to the instance is , every time you reboot the instance the IP of the aws instance will change
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    130
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider
    Thanks for the reply!

    An elastic IP is already assigned and is being used. I have set up WHM servers many times so I am very familiar with it but this is the first time installing on AWS. I found a couple of guides that were pretty old and none of them mentioned doing anything special other than assigning an elastic IP. Will having DHCP set cause any issues?
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,819
    Likes Received:
    134
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @tomdchi

    cPanel may experience issues with IP if it's not static. You may want to contact AWS to identify the proper network configuration on their servers when running cPanel.

    I know I did find some other resources which address the same issue you had here:

    Part 2: How I Built a cPanel Hosting Environment on Amazon AWS | cPanel Blog
    How to fix local IP in Nat Configuration on WHM/Cpanel on Centos 6 on Google Compute Engine

    But if neither of these provides a resolution contacting AWS would be the best route.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    130
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider
    Finally found the solution! If someone else has the same problem here is what you do:
    1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 with appropriate parameters to set as static.
    2. Edit /etc/cloud/cloud.cfg and at the end of the file add:
    Code:
    network:
     config: disabled
    Now cloud-init will stop overwriting your network config.
     
    cPanelLauren likes this.
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,819
    Likes Received:
    134
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @tomdchi


    I'm glad you found a solution and thank you so much for sharing it!

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. mekatech

    mekatech Member

    Joined:
    Aug 11, 2016
    Messages:
    12
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Dominican Republic
    cPanel Access Level:
    Root Administrator
    Bro, can you help me to understand how to add elastik ips as dedicated ips to whm for ssl purposes, cpanel is lacking a little support for that
     
Loading...
Similar Threads - networking
  1. rinkleton
    Replies:
    1
    Views:
    555

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice