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)

  1. Connect to the server via the console in your account dashboard.

  2. Open the network configuration file:

    sudo nano /etc/netplan/00-installer-config.yaml
    
  3. 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 via field 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]
  1. Save and exit (Ctrl + O → Enter → Ctrl + X).
  2. Apply the changes:
    sudo netplan apply
    

CentOS / Rocky Linux / AlmaLinux / Fedora (nmcli)

  1. Identify your active network interface (usually eth0 or ens3):

    nmcli connection show
    
  2. 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]
    
  3. Activate the new settings:

    sudo nmcli connection up 'eth0'
    

CentOS / RHEL (Legacy ifcfg method)

  1. Open the interface configuration file:

    sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
    
  2. 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
    
  3. Restart the network service:

    sudo systemctl restart network
    

Debian (Classic /etc/network/interfaces method)

  1. Open the interfaces file:

    sudo nano /etc/network/interfaces
    
  2. 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
    
  3. 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!

Need help?Our engineers will help you free of charge with any question in minutesContact us