I have a Docker host running on a CentOS7 VM with dual-stacked interface having both IPv4 and IPv6 addresses. For example:
192.168.1.200/24
fd00:192:168:1::200/64
I have enabled IPv6 on the Docker host, and created a user defined bridge network with an IPv6 subnet. For example:
docker network create
–ipv6
–driver=bridge
–subnet=fd00:172:16:1::/64
brv6-172:16:1::
I have created a CentOS7 container on this user defined bridge network and assigned it IPv6 address fd00:172:16:1::101.
From the Docker host, I can successfully ssh to the container via fd00:172:16:1::101. From the container, I can successfully ssh to the IPv6 address of the Docker host (fd00:192:168:1::200).
However, I have a standard (not a Docker host) CentOS7 VM on the same network as Docker host with IPs:
192.168.1.14/24
fd00:192:168:1::14
On this host, I have setup a static route for the user defined bridge network via the Docker host:
route -A inet6 add fd00:172:16:1::/64 gw fd00:192:168:1::200
Using the ping6 utility, I can confirm communication between this host and the Docker container. That is:
(CentOS VM) fd00:192:168:1::14 → ping6 → (Docker CentOS container) fd00:172:16:1::101 is successful
The other direction is also successful:
(Docker CentOS container) fd00:172:16:1::101 → ping6 → (CentOS VM) fd00:192:168:1::14 is successful
The problem comes when I try to ssh to/from the container, I get a permission denied error:
From the CentOS VM to Docker CentOS Container:
ssh: connect to host fd00:172:16:1::101 port 22: Permission denied
From the Docker CentOS Container to the CentOS VM:
ssh: connect to host fd00:192:168:1::14 port 22: Permission denied
I suspect the “Permission denied” is offering some clue, but I have not found it yet. I am looking for any assistance in achieving the desired connectivity.
Thanks,
Greg