> ## Documentation Index
> Fetch the complete documentation index at: https://docs.edbb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manually Update IPv4 Settings on Ubuntu (18.04–24.04)

> Use Netplan to change IPv4 addresses, gateways, or DNS entries on Ubuntu VPS instances running on EDBB.

## Update IPv4 Settings via Netplan

<Info>
  Netplan is the default network configuration tool on Ubuntu 18.04 through 24.04. Always grab the latest IP details from the EDBB Control Panel before editing configuration files.
</Info>

***

## Step 1 – Collect Network Information

<Steps>
  <Step title="Open the Network tab">
    Sign in to the <a href="https://my.edbb.com/clientarea.php" target="_blank">EDBB Control Panel</a>, open your VPS, and switch to <strong>Network</strong>. Note the IPv4 address, subnet, gateway, and DNS servers.
  </Step>

  <Step title="Plan primary vs secondary IPs">
    Decide which addresses should be primary (first in the list) and which should be secondary.
  </Step>
</Steps>

***

## Step 2 – Access the Server

* Connect via SSH if the current IP is reachable. Otherwise, enable VNC in the quick actions and click <strong>Open Console</strong>.
* Identify the network interface name:

```bash theme={"system"}
ip link show
```

Record the correct interface (for example `ens3`, `ens18`, or `eth0`).

***

## Step 3 – Locate the Netplan File

```bash theme={"system"}
ls /etc/netplan/
```

Common filenames include `50-cloud-init.yaml` or `01-netcfg.yaml`. Open the relevant file with your editor:

```bash theme={"system"}
sudo nano /etc/netplan/50-cloud-init.yaml
```

(Adjust the filename if it differs.)

***

## Step 4 – Edit IPv4 Addresses and DNS

```yaml theme={"system"}
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 Control Panel data.
* Maintain spacing—YAML is indentation-sensitive.

***

## Step 5 – Apply the Configuration

```bash theme={"system"}
sudo netplan try   # dry-run with rollback
sudo netplan apply
```

If `netplan try` reports errors, press <strong>Esc</strong> to cancel, fix the file, and retry.

Verify the changes:

```bash theme={"system"}
ip addr show dev ens3
ip route show default
```

(Substitute your interface name if different.)

***

## Step 6 – Confirm Connectivity

```bash theme={"system"}
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 Control Panel 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.
