I am using Docker 17.04.0-ce on Ubuntu 16.04.
I am running several containers on my host which expose public ports, some should be only accessible by certain ip ranges, while others, like an nginx proxy listening on port 80 and 443, should be publicly accessible.
Using the default configuration my iptables configuration of the INPUT chain was ignored, allowing all containers with bound ports to be accessed from anywhere. So I learned that I had to provide the
--iptables=false option to docker, which worked fine.
While I now can control the access to the different ports using iptables, my nginx container is no longer able to see the ip address of the connecting client, but only gets the ip of the
docker0 bridge (172.17.41.1 in my case).
Is there any way to allow the nginx container to see the connecting clients ip without loosing control over iptables again?
Side note: I do not want to put all containers on the host net (