Unable to add IPv6 address to dummy interface inside the container


I’m building a container that uses IPv6. Base IPv6 connectivity is working fine, but the application I’m using also needs a dummy interface with an IPv6 (and also IPv4) address on it:

ip link add dummy0 type dummy

ip a a dev dummy0

works fine.

But when I try to add IPv6 address:

ip a a fd12:3456:7891:a::1/128 dev dummy0
ip: RTNETLINK answers: Permission denied

I tried with --privileged but that doesn’t change anything. Any idea how to add an IPv6 address to a dummy interface inside the container? (I have also tried ‘public IPv6’, that doesn’t work either)

docker --version
Docker version 19.03.4, build 9013bf583a

Replying to myself here, for future reference.

It looks like it’s just not possible to use the ‘dummy’ type interface and assign it an IPv6 address, so I have resorted to using ‘lo’ interface and adding the addresses there.

Hi, if you add --sysctl net.ipv6.conf.all.disable_ipv6=0 to your docker run command you’ll be able to achieve what you were trying to do!