Skip to content

Instantly share code, notes, and snippets.

@malikshi
Forked from casualjim/OVH IPv6 Ubuntu.md
Created August 27, 2022 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malikshi/7c9fda26604c077edf0955e239a8025e to your computer and use it in GitHub Desktop.
Save malikshi/7c9fda26604c077edf0955e239a8025e to your computer and use it in GitHub Desktop.
Actually working IPv6 dedicated server configuration for ubuntu

Configure IPv6 on Ubuntu 20.04 on OVH dedicated

Contrary to the guide, do this instead

the gateway is in the /56 network but so you have to get your ip in there.

Edit: /etc/netplan/50-cloud-init.yaml

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        eno1:
            dhcp4: true
            match:
                macaddress: xx:xx:xx:xx:xx:xx
            set-name: eno1
            addresses: ["${YOUR_IPV6_ADDRESS}/56"]
            routes:
            - to: "${IPV6_GATEWAY}"
              scope: link
            - to: default
              via: "${IPV6_GATEWAY}"
              on-link: true

This sets up some persistent config, it also renames the interface which happens a bit too late for systemd-networkd

Next also configure your interface, in my case in /etc/systemd/network/pub.network

[Match]
MACAddress=xx:xx:xx:xx:xx:xx

[Network]
DHCP=ipv4
IPv6AcceptRA=no
LinkLocalAddressing=no

[Address]
Address=${YOUR_IPV6_ADDRESS}/56

[Route]
Gateway=${IPV6_GATEWAY}
GatewayOnLink=yes

And then reboot

sudo systemctl reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment