I am trying to configure docker together with iptables rules. In the default docker settings no rule will take effect, because of the docker FORWARD entries.
In the link there is a workaround described to add a custom table PRE_DOCKER to handle restrictions after docker has started. I tried it and it worked.
But I think in case the script to add the rules after starting docker is not succesfully processed all containers will remain accessible from all the internet.
When we set iptables=false in the docker config, the iptables rules will be active but the client IP is the IP of the Docker bridge.
How can we configure docker to use our existing iptables rules AND provide the original remote / client IP?
Docker 17.03.1 is running on Ubuntu 16.04 LTS.
EDIT: What I want to achieve is that docker provides the remote IP to the container even when docker is configured with iptables = false (I don´t want docker to change / bypass my existing rules)
Thank you in advance for any information.