WHM on AWS and networking
I have WHM installed on AWS and the networking is configured as DHCP.
/etc/sysconfig/network-scripts/ifcfg-eth0 has
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.
# 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.
-
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 0 -
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
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?0 -
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! 0 -
Finally found the solution! If someone else has the same problem here is what you do: - Edit /etc/sysconfig/network-scripts/ifcfg-eth0 with appropriate parameters to set as static.
- Edit /etc/cloud/cloud.cfg and at the end of the file add:
network: config: disabled
Now cloud-init will stop overwriting your network config.0 -
Hi @tomdchi I'm glad you found a solution and thank you so much for sharing it! Thanks! 0 -
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: 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!
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 that0
Please sign in to leave a comment.
Comments
6 comments