Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuring IPv6 block from Online.net On Proxmox Host and Guests

Configuring IPv6 block from Online.net On Proxmox Host and Guests

Following the documentation on online.net would get IPv6 to work only in a simple system installation but won't get IPv6 to work with virtualization environment (Exp. Proxmox) as It's missing some IPv6 forwards and proxies on sysctl.conf.

On Proxmox Host (Or Debian if single Debian Installation)

Enable IPv6 on the System:

  • Change Module Options to Enable IPv6:

In the following file:

/etc/modprobe.d/local.conf

enable IPv6 by changing the 1 to 0:

options ipv6 disable=0
  • Load IPv6 Kernel Module at the boot: Edit the following file:
/etc/modules

Add ipv6:

ipv6
  • Reboot the server to load IPv6 Modules

Now the system has IPv6 modules loaded and enabled, we need to configure and allow IPv6 forwarding.

Note: You can skip this step if you have simple Debian installation without Virtualization.

  • Enable Forwarding by adding them into the system variables:

Edit the system variables file:

/etc/sysctl.conf

Disable autoconf for ipv6 on interface vmbr0, enable forwards on default interface and all other interfaces, enable NDP proxy on default and all interfaces, as the following:

net.ipv6.conf.vmbr0.autoconf = 0
net.ipv6.conf.vmbr0.accept_ra = 2

net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1

net.ipv6.conf.default.proxy_ndp = 1
net.ipv6.conf.all.proxy_ndp = 1

Read the new system variables, by executing the command:

sysctl -p

At this point we enabled IPv6 on the system by loading the required modules, and enabling forwarding and ndp proxy on the host, so that our guest machines can obtain IPv6 addresses from the host.

Configuring the IPv6 Client

We will use the default DHCP client to issue and get the IP Block from the router using DUID given in online.net console.

Edit or create the following file if not exists:

/etc/dhcp/dhclient6.conf

Add the following lines:

interface "vmbr0" {
   send dhcp6.client-id DUID;
}

Where vmbr0 represents the main interface, and DUID obtained from Online.net IPv6 Panel.

Configuring Interfaces file to add IPv6 address and run the dhclient6

Edit the interfaces file:

/etc/network/interfaces

And add the following lines:

iface vmbr0 inet6 static
    address YOUR_IPv6
    netmask YOUR_SUBNET
    accept_ra 1
    pre-up dhclient -cf /etc/dhcp/dhclient6.conf -pf /run/dhclient6.vmbr0.pid -v -nw -6 -P vmbr0
    pre-down dhclient -x -pf /run/dhclient6.vmbr0.pid

Note: YOUR-IPv6 is the created subnet from online.net IPv6 panel, for example:

iface vmbr0 inet6 static
    address 2001:bc8:50ca:101::1
    netmask 64
  • Reboot the server, and your server should get IPv6 address now.

IPv6 On Proxmox Container:

  • On Proxmox GUI, create new network device, use vmbr0 as bridge.
  • Enter the desired IPv6 from your IPv6 block but not the one that's taken from host (Exp. 2001:bc8:50ca:101::2/64)
  • Enter the IPv6 of the host as gateway (2001:bc8:50ca:101::1).
  • Enter DNS server, exp. Google Public DNS: 2001:4860:4860::8888 and 2001:4860:4860::8844

After Rebooting the container it should have an IPv6 connectivity and connection to the internet.

IPv6 On Proxmox VM:

  • On Proxmox GUI, from Hardware windows edit the current IPv4 network device to IPv6 to it (only if it uses vmbr0 as Bridge, if it's on other bridge then create new network device).
  • Start the VM
  • Edit the interfaces file on the VM, /etc/network/interfaces
  • Add IPv6:
iface ens18 inet6 static
        address 2001:bc8:50ca:101::3
        netmask 64
  • restart the networking service networking restart or reboot the VM.

Known Problems:

  • The host loses IPv6 address after rebooting or after some time (an hour). checking the interface IPs:
ip a show vmbr0

If you notice that inet6 where our IPv6 is assigned is gone, then you have this problem, to fix the issue temporary, issue new IP:

ip -6 a a 2001:bc8:50ca:101::1/64 dev vmbr0

Now test the Connectivity:

ping6 ipv6.google.com

Note: that you need to do this everytime you restart the host.

The reason for this problem, may be due to this line in /etc/network/interfaces:

iface vmbr0 inet6 static
    address 2001:bc8:50ca:101::1
    netmask 64
    accept_ra 1
    pre-up dhclient -cf /etc/dhcp/dhclient6.conf -pf /run/dhclient6.vmbr0.pid -v -nw -6 -P vmbr0
    pre-down dhclient -x -pf /run/dhclient6.vmbr0.pid

The system is trying to assign IPv6 but the pre-up phase hasn't been touched yet (timing problem), the pre-up line should be finished so the system can pull the IPv6 block from the router.

Still Investigating the issue.

@andrekutianski

This comment has been minimized.

Copy link

@andrekutianski andrekutianski commented Feb 11, 2019

this configuration is for Proxmox 5?

@DonSYS91

This comment has been minimized.

Copy link
Owner Author

@DonSYS91 DonSYS91 commented Dec 28, 2019

this configuration is for Proxmox 5?

Sorry missed your question since long time, yes at that time it was for PVE5

@warlof

This comment has been minimized.

Copy link

@warlof warlof commented Jan 5, 2020

Hi @DonMcCoy,

I just found that gist which I'm using to setup my own proxmox at Online.
Did you figure why the server didn't get its IPv6 after boot and find a way to fix it ?

@DonSYS91

This comment has been minimized.

Copy link
Owner Author

@DonSYS91 DonSYS91 commented Jan 5, 2020

Hi @warlof,

I remember i solved the problem, too bad i didn't update my gist and since then i ditched online for hetzner.

I hope i can find an Online.net server lying around to test the possible solution

@kamzata

This comment has been minimized.

Copy link

@kamzata kamzata commented May 8, 2020

Hi @warlof,

I remember i solved the problem, too bad i didn't update my gist and since then i ditched online for hetzner.

I hope i can find an Online.net server lying around to test the possible solution

I'm with Online/Scaleway (Dedibox Pro series) since 2013 but I'm thinking to moving to Hetzner. 1 year ago I tried to setup IPv6 on my Dedibox with Proxmox but it didn't work 'cause a Online.net IPv6 network problem. Anyway... how is the Hetzner server? Better than Online.net? Are you happy of migration? I was thinking to take an AX51-NVMe...

@aminvakil

This comment has been minimized.

Copy link

@aminvakil aminvakil commented May 12, 2020

@DonMcCoy
So this documentation works for hetzner servers?

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