How do I add a public IPv6 to my instance?

You can add an IPv6 address for instances on the public network.

In this article, we will show you how to add the IPv6 address to your instance.

Please note this article is only for instances on the public network

These are the general details you need for the setup:

IPV6 Gateway

Netmask

2a11:4880:1::1

/64

For RHEL based systems. (AlmaLinux, RockyLinux, Fedora etc.)

You can find your IP addresses in the details of your instances.

  1. Open the console of your instance.
Make sure you can log into your instance via public-key. Because after this step, a password reset via the GUI will no longer work. Consider creating a snapshot first.
  1. To keep the network configuration, we first need to disable cloud-init.
    touch /etc/cloud/cloud-init.disabled
    rm /etc/sysconfig/network-scripts/ifcfg-eth0
  2. Add your IPv6 using the graphical interface of RHEL based systems nmtui , run this command:
    nmtui
  3. A window will open, use the arrow keys to navigate and enter to confirm. In the opened window choose 'Edit a connection' and then <ok>
  4. Then choose interface eth0 and then <edit>:
  5. Navigate to the IPv6 configuration with the arrow keys and change it from 'Automatic' to 'Manual'
  6. Enter your IPv6 Address (do not forget the /64 at the end) and the gateway:
  7. Choose <ok> and press the 'esc' key. You will return to the start screen of nmtui , choose quit and <ok>
  8. Restart your instance to apply the configuration
  9. Done, you now also have IPv6 on your instance.

For Debian based systems (ubuntu, kali linux etc.)

  1. Open the console of your instance.
Make sure you can log into your instance via public-key. Because after this step, a password reset via the GUI will no longer work. Consider creating a snapshot first.
  1. To keep the network configuration, we first need to disable cloud-init. Create this file:
    touch /etc/cloud/cloud-init.disabled
  2. Then we modify the existing cloud-init network file by renaming it:
    mv /etc/netplan/50-cloud-init.yaml /etc/netplan/01-netcfg.yaml
  3. Then run the following command:
    dpkg-reconfigure cloud-init
  4. Then we are going to add the IPv6 address:
    nano /etc/netplan/01-netcfg.yaml
  5. Modify the file as follows (replace the example IPv6 with the IPv6 of your instance):
    network:
    ethernets:
    ens3:
    dhcp4: yes
    dhcp6: no
    addresses:
    - 2a11:4880:1:0:1c00:00ff:fe00:00a0/64
    routes:
    - to: default
    via: 2a01:7c8:aab5::1
    In your console it should look like this:

Save the file and exit, in nano (ctrl enter).

  1. Adjust the permissions of the file:
    chmod 600 /etc/netplan/01-netcfg.yaml

    apply the new configuration:
    netplan apply
  2. Done, you now also have IPv6 on your instance.

>Can't quite figure it out? Then contact our customer service.


Still have questions? Get in touch.