Docker Community Forums

Share and learn in the Docker community.

[Solved] --net=host suddenly stopped working


(Gonzague) #1


I’m getting some strange issue today. I have a bunch of containers usually running using -p parameter except one that is using --net=host

I’m running the docker daemon on an Ubuntu 16.04 server.
Docker version: 17.12.0-ce
I don’t use UFW and apparmor has been disabled.

Today, external access stopped working. My container with th --net=host has an application running on port 4567

If i SSH into my server and do a curl localhost:4567 i get the expected content but from any other machine i’m getting:

curl: (7) Failed to connect to port 4567: No route to host

If i remove --net=host and use -p 4567:4567 then the web ui works as expected but i need host network for that specific application.

I’m really clueless on this one and don’t know where to start looking. Especially that everything was working fine yesterday.

Obviously I was working on the server and install then uninstalled a bunch of stuff before it happened (libvrt, wok, kimchi and all their dependencies) and uninstalled wok / kimchi / nginx (that was somehow installed as a wok/kimchi dependency), so I guess it’s related but I really have no idea where to look to fix this.

Thanks in advance.

(Gonzague) #2

Seems like it was just an IP tables issue. Not sure why it changed.