Docker Community Forums

Share and learn in the Docker community.

Container only binding to ipv6 address


(Praetor242) #1

I’ve scoured the Red Hat knowledge base and the Interwebz, but I’m at a loss.

I have Docker running on RHEL 7.2. When I create a container, and expose it’s ports, it only binds to the ipv6 address. Not ipv4, so I can’t access my containers. I’m sure I’m doing something stupid. I’m a Docker newb.

Any help is appreciated.


(Jeff Anderson) #2

How are you testing that it is only binding to the ipv6 ports?


(Praetor242) #3

I’ve been using netstat


(Jeff Anderson) #4

If you’re referring to output that looks like this in netstat -nl:

tcp6       0      0 [::]:ssh                [::]:*                  LISTEN

That’s the expected output for a process that is configured to run on all interfaces, ipv4 and ipv6 both.


(Jeff Anderson) #5

Usually if you are having trouble trying to connect to a published port, it’s because your containerized process simply isn’t listening on the port on eth0 in the container.

Double check that it’s actually listening at all, and not just on the container’s 127.0.0.1.