Docker Community Forums

Share and learn in the Docker community.

Connecting an IPv6 macvlan network is removing port forwarding of bridge network

Hello, on a host with multiple NICs I’d like to run a container with two networks: the default bridge and a macvlan network with IPv6 address.

I’m starting the container with default docker bridge and published ports 30000-30001.
iptables are correctly configured and “docker port” is reporting them correctly

As soon as I connect the macvlan network with IPv6 address, the port forwarding is removed.
iptables specific entries are cleared and output from docker port is empty.

Looking at daemon debug output it seems this is a wanted feature.
But if the macvlan network is IPv4 only the behavior is different i.e. the port forwarding is not removed.

So the question is: any way to have port forwarding kept also in case of macvlan IPv6 ?

Thanks
Andrea

OS Version/build
OS:CentOS Linux release 7.7.1908 (Core)
kernel: Linux svo-poc-02.cisco.com 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:27:04 2020
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:25:42 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683