Trying to set IPv6 token, adding LXC options in container config file

rsolva

New Member
Nov 13, 2022
1
0
1
Norway
Context: I'm using an up-to-date rocky linux 9 container template on Proxmox 7.2-1.

What I'm trying to achieve is to set an IPv6 token for the container. I know this is possible, because if i add IPV6_TOKEN=::[TOKEN] to /etc/sysconfig/network-scripts/ifcfg-eth0 and do a systemctl restart NetworkManager, the container does get an IPv6 address with the correct token. The only problem is that the ifcfg-eth0 file is overwritten (not persistant) between boots.

When I try an ip token set ::[TOKEN] dev eth0 I get «Error: ipv6: Router advertisement is disabled on device.»

To fix this I tried enabling Router Advertisement for IPv6 by adding the following line at the bottom of /etc/pve/lxc/[CIDR].conf (host/proxmox):

Code:
lxc.sys.ipv6.conf.eth0.accept_ra: 1
# I also tried using '=' instead of ':'

But the lines are striped away from the config file when I start/stop the container. The wiki states that «It is possible to add low-level, LXC style configuration directly […]» and gives a few examples, so I guess this should be possible.

Does anyone know of a way to ensure that the IPv6 token is set permanently for the container?
 
Last edited: