Changing your IP address after a server restore
Guide to updating network configurations on VPS and dedicated servers.
When you restore a dedicated server or a VPS from a backup, the system is often assigned a new IP address. To restore connectivity, you must manually update the network configuration files within the Operating System.
Ubuntu / Debian (Using Netplan)
-
Connect to the server via the console in your account dashboard.
-
Open the network configuration file:
sudo nano /etc/netplan/00-installer-config.yaml -
Locate the eth0 block (or your specific interface name) and update the following:
- Addresses: replace the old IP with your new IPv4/IPv6 address.
- Routes/Gateway: update the
viafield with your new gateway. - Nameservers: ensure your DNS resolvers are correct.
Example configuration:
network:
version: 2
ethernets:
eth0:
addresses:
- [your_new_ipv4_address]/24
- [your_ipv6_address]/48
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
routes:
- to: default
via: [your_new_gateway_v4]
- to: ::/0
via: [your_new_gateway_v6]
- Save and exit (
Ctrl + O→ Enter →Ctrl + X). - Apply the changes:
sudo netplan apply
CentOS / Rocky Linux / AlmaLinux / Fedora (nmcli)
-
Identify your active network interface (usually eth0 or ens3):
nmcli connection show -
Update the IPv4 address and gateway:
sudo nmcli connection modify 'eth0' ipv4.addresses [your_new_ipv4_address]/24 sudo nmcli connection modify 'eth0' ipv4.gateway [your_new_gateway_v4] -
Activate the new settings:
sudo nmcli connection up 'eth0'
CentOS / RHEL (Legacy ifcfg method)
-
Open the interface configuration file:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0 -
Update the static parameters:
BOOTPROTO=static IPADDR=[your_new_ipv4_address] NETMASK=255.255.255.0 GATEWAY=[your_new_gateway_v4] DNS1=8.8.8.8 DNS2=8.8.4.4 ONBOOT=yes -
Restart the network service:
sudo systemctl restart network
Debian (Classic /etc/network/interfaces method)
-
Open the interfaces file:
sudo nano /etc/network/interfaces -
Modify the interface block:
auto eth0 iface eth0 inet static address [your_new_ipv4_address] netmask 255.255.255.0 gateway [your_new_gateway_v4] dns-nameservers 8.8.8.8 8.8.4.4 -
Restart the networking service:
sudo systemctl restart networking
Critical reminders
- Losing connection: the moment you apply these changes, your old IP connection (including SSH) will drop. Switch to the Web Console immediately if you get locked out.
- Accuracy: double-check the gateway and subnet mask provided in your Fornex dashboard. A single typo will prevent the server from reaching the internet.
- Safety first: we strongly recommend taking a quick snapshot or a backup of your configuration files before making manual edits.
Help
If you have any questions or need assistance, please contact us through the ticket system — we're always here to help!