How to Update IP Address on Debian Servers (Debian 10, 11, 12) Print

  • 0

Step-by-Step Instructions

 

For Debian Servers using /etc/network/interfaces (Traditional Setup):

(Typically default for Debian 10, 11, and sometimes 12 if manually configured.)

  1. Access the server via SSH or IPMI Console.
  2. Open the network interfaces file:

sudo nano /etc/network/interfaces

  1. Update the static IP configuration:

Find your interface section, usually eth0 or ens18, and edit it like this:

auto eth0

iface eth0 inet static

    address 104.160.9.50

    netmask 255.255.255.0

    gateway 104.160.9.1

    dns-nameservers 8.8.8.8 8.8.4.4

Make sure the spacing is consistent.

  • address: your new IP
  • gateway: your new gateway
  • dns-nameservers: optional but recommended (Google DNS)

 

  1. Restart networking to apply changes:

sudo systemctl restart networking

 

For Debian Servers using Netplan (Rare in Debian 12 Minimal Installs):

(If /etc/netplan/ exists, your system uses Netplan.)

  1. Open the netplan configuration file:

sudo nano /etc/netplan/*.yaml

  1. Update the IP settings:

network:

  version: 2

  ethernets:

    eth0:

      addresses:

        - 104.160.9.50/24

      nameservers:

        addresses:

          - 8.8.8.8

          - 8.8.4.4

      routes:

        - to: default

          via: 104.160.9.1

  1. Apply changes:

sudo netplan apply

 

Final Notes:

  • Always backup your configuration file before making changes.
  • Confirm your network interface name with ip a if unsure (might be eth0, ens18, etc.).
  • Ensure proper YAML spacing if using Netplan (2 spaces per indent).

 

Need Help?

If you encounter any problems during the IP update process, please open a support ticket — we are ready to assist you!

 

OffshoreDedicated.NET

Privacy Made Easy


Was this answer helpful?

« Back