Saturday, 12 May 2018

networking - What is the best way to limit the IP addresses which can be access from within a docker container?

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

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...