Configuring IPv6 after changing the IPv6 of VM

When you change the IPv6 address of your Hetzner VMs in Doprax, there’s an extra step needed to fully configure it. If you’re using Ubuntu 20.04 or later with Netplan, follow these steps to complete the process:

Access Your VM via SSH:

The easiest way to access your VM is to use Doprax in-browser terminal. It gives you one-click You can use SSH clients like Linux or mac’s terminal or in windows Putty or any other SSH client of your choice to connect to your server.

Edit the Network Configuration File:

Open the Netplan configuration file using your preferred text editor:

nano /etc/netplan/50-cloud-init.yaml
  • Find the addresses section under the relevant Ethernet interface (e.g., eth0).
  • Add your new Primary IPv6 address from your Doprax subnet. Replace 2001:db8:0:3df1::1 with your desired IPv6 address.
  • Example:
network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - <IPv6 address from your subnet, e.g., 2001:db8:0:3df1::1>/64
      dhcp4: true
      routes:
        - to: default
          via: fe80::1
      match:
        macaddress: your-original-macaddress
      nameservers:
        addresses:
          - 2a01:4ff:ff00::add:2
          - 2a01:4ff:ff00::add:1
      set-name: eth0

Note: Make sure you don’t change any other settings like the MAC address.

Apply the Changes:

To save and exit in Nano, press Ctrl + O to write the changes, then hit Enter to confirm. Afterward, press Ctrl + X to exit the editor.

Run the following command to apply your updated configuration:

sudo netplan apply

Your new Primary IPv6 address should now be active on your server.

Please do tell us, did you find the content above helpful?