0

I have a virtual machine running on VBox. This VM contains the host and three dockers, let`s name the dockers as the_first, the_second, the_third.

I want to apply a filter on network firewall with iptables that can do this:

Running through the host and set this from terminal:

To block all connections that are going to the second docker but(all connections) but in the same time to allow some protocols like ssh, icmp and ftp.

I understand the functionality of INPUT or OUTPUT iptables rules but i don`t know how to use it in one state or maybe 2-3 lines to do what i explained before.

  • Your question is hard to read. Please edit it and remove typos/duplicate words if you can. Adding more specifics can also help - port numbers, etc could help. In particular, please check https://docs.docker.com/config/containers/container-networking/ and clarify which ports are exposed by docker and why is it not sufficient. – rvs Jan 24 '22 at 15:06

0 Answers0