IPv6 Configuration
Your virtual machine supports both IPv4 and IPv6 connectivity. If you have initially set up your virtual machine it works automatically, however, certain changes require a manual configuration. For example, when IPv6 is enabled or a private network has been attached after the virtual machine was already created.
Choose your Linux version
Edit your network configuration
vim /etc/netplan/50-cloud-init.yaml
Add the IPv6 address and a route to your gateway
You can find your assigned IPv6 address and gateway under the "Network" tab of your virtual machine. Below you can see an example configuration:
network:
version: 2
ethernets:
eth0:
match:
macaddress: "bc:24:11:a6:33:1b"
addresses:
- "37.139.142.89/28"
- "2a00:a7c0:1357:3::1/64"
nameservers:
addresses:
- 37.139.139.39
- 37.139.139.139
- 2a00:a7c0:1000:1::39
set-name: "eth0"
routes:
- to: "default"
via: "37.139.142.81"
- on-link: true
to: "default"
via: "fe80::200:5eff:fe00:2c8"
Apply the configuration
sudo netplan apply
Edit your network configuration
vim /etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection
Add the IPv6 address and a route to your gateway
You can find your assigned IPv6 address and gateway under the "Network" tab of your virtual machine. Below you can see an example configuration:
[ipv6]
method=manual
may-fail=false
address1=2a00:a7c0:1357:2::1/64
gateway=fe80::200:5eff:fe00:2c8
dns=2a00:a7c0:1000:1::39;
Apply the configuration
sudo nmcli con reload eth0
Edit your network configuration
vim /etc/sysconfig/network-scripts/ifcfg-eth0
Add the IPv6 address and a route to your gateway
You can find your assigned IPv6 address and gateway under the "Network" tab of your virtual machine. Below you can see an example configuration:
IPV6ADDR=2a00:a7c0:1357:3::1/64
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFAULTGW=fe80::200:5eff:fe00:2c8
IPV6_FORCE_ACCEPT_RA=no
Apply the configuration
sudo systemctl restart NetworkManager
(Advanced option) Force a re-run of cloud-init
Making cloud-init run again may be destructive and must never be done on a production system. Artifacts such as ssh keys or passwords may be overwritten.
When cloud init runs again it will set the correct default network values and therefore your IPv4 and IPv6 connectivity should be working out of the box. You do need to reboot your virtual machine for changes to take into effect.

