Skip to main content

Update IPv4 Settings via Netplan

Netplan is the default network configuration tool on Ubuntu 18.04 through 24.04. Always grab the latest IP details from the EDBB portal before editing configuration files.

Step 1 – Collect Network Information

1

Open the Network tab

Sign in to the EDBB VPS Portal, open your VPS, and switch to Network. Note the IPv4 address, subnet, gateway, and DNS servers.
2

Plan primary vs secondary IPs

Decide which addresses should be primary (first in the list) and which should be secondary.

Step 2 – Access the Server

  • Connect via SSH if the current IP is reachable. Otherwise, enable VNC in the quick actions and click Open Console.
  • Identify the network interface name:
ip link show
Record the correct interface (for example ens3, ens18, or eth0).

Step 3 – Locate the Netplan File

ls /etc/netplan/
Common filenames include 50-cloud-init.yaml or 01-netcfg.yaml. Open the relevant file with your editor:
sudo nano /etc/netplan/50-cloud-init.yaml
(Adjust the filename if it differs.)

Step 4 – Edit IPv4 Addresses and DNS

network:
  version: 2
  ethernets:
    ens3:
      addresses:
        - 203.0.113.10/24      # Primary IPv4
        - 203.0.113.11/24      # Optional secondary
      gateway4: 203.0.113.1
      nameservers:
        addresses:
          - 203.0.113.2
          - 1.1.1.1
  • Replace ens3 with your interface name.
  • Update addresses, gateway, and DNS values using the portal data.
  • Maintain spacing—YAML is indentation-sensitive.

Step 5 – Apply the Configuration

sudo netplan try   # dry-run with rollback
sudo netplan apply
If netplan try reports errors, press Esc to cancel, fix the file, and retry. Verify the changes:
ip addr show dev ens3
ip route show default
(Substitute your interface name if different.)

Step 6 – Confirm Connectivity

ping -c 3 203.0.113.1       # gateway
ping -c 3 edbb.com
Reconnect via SSH using the new address once the pings succeed. Disable VNC in the portal if you no longer need the console.

Best Practices

  • Back up the original Netplan file before editing: sudo cp 50-cloud-init.yaml 50-cloud-init.yaml.bak.
  • List the primary IPv4 first so Ubuntu uses it for outbound connections.
  • Update firewall rules and application bindings to reflect the new IP.
  • Document the change (date, technician, new IPs) for your internal records.
Your Ubuntu VPS now uses the updated IPv4 configuration supplied by EDBB.