I have an answer which will limit docker containers to only be able to access a single IP address outside the host. Using this iptables rule on the host:
means that from inside any docker containers it is only possible to access the IP address 8.8.8.8.
This is fairly drastic - basically, if the destination is NOT 8.8.8.8 then drop the packet.
What is the best way that I can set up rules which would allow me limit the containers to a certain number of IP addresses?
No comments:
Post a Comment