These changes can be made through SSH as your root user, or through your browser VNC. You can access your browser VNC through your https://cloud.hawkhost.com control panel, which is also accessible through your client area when viewing your compute service.
CentOS and AlmaLinux:
- Login to your compute as your root user
- With your preferred text editor, open your network configuration file, located at /etc/sysconfig/network-scripts/ifcfg-eth0. For purpose of our example, we'll use nano as the editor:
nano /etc/sysconfig/network-scripts/ifcfg-eth0
- When your network config file opens, you will see a format similar to below:
DEVICE="eth0"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="64.46.102.34"
NETMASK="255.255.255.0"
NETWORK="64.46.102.0"
BROADCAST="64.46.102.255"
GATEWAY="64.46.102.1"
OR
AUTOCONNECT_PRIORITY=120
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
DNS1=8.8.8.8
DNS2=8.8.4.4
GATEWAY=198.252.100.126
HWADDR=00:3c:a8:a8:ca:38
IPADDR=198.252.100.63
NETMASK=255.255.255.128
ONBOOT=yes
TYPE=Ethernet
USERCTL=no - Replace each field as instructed from your support ticket with your new IP information. For example, if your new IP address is 198.252.108.1, you would replace the current IPADDR 198.252.100.63 with your new IP 198.252.108.1. If your new GATEWAY is 198.252.108.126, replace the current GATEWAY 198.252.100.126 with 198.252.108.126
- Once you have made the changes, close your text editor and save all changes
- Reboot your compute, either by issuing the command systemctl reboot or through your browser cloud control panel
Ubuntu
- Login to your compute as your root user
- With your preferred text editor, open your network configuration file, located at /etc/netplan/50-cloud-init.yaml. For purpose of our example, we'll use nano as the editor:
nano /etc/netplan/50-cloud-init.yaml
- When your network config file opens, you will see a format similar to below:
network:
ethernets:
ens3:
addresses:
- 172.96.184.115/25
gateway4: 172.96.184.126
match:
macaddress: 00:93:21:40:7c:fd
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
routes:
- scope: link
to: 172.96.184.126
via: 0.0.0.0
version: 2 - Replace each field as instructed from your support ticket with your new IP information. For example, if your new IP address is 198.252.108.1, you would replace the current IPADDR 172.96.184.115 with your new IP 198.252.108.1. If your new GATEWAY is 198.252.108.126, replace the current GATEWAY 172.96.184.126 with 198.252.108.126
- Once you have made the changes, close your text editor and save all changes
- Reboot your compute, either by issuing the command systemctl reboot or through your browser cloud control panel