S
S
Sergey Degtyar2021-04-05 22:47:31
iptables
Sergey Degtyar, 2021-04-05 22:47:31

How to save Iptables rules if docker is installed?

Faced the problem of saving firewall rules if docker is installed. Its rules are also saved automatically, which would not be desirable. How to properly organize the work of iptables with docker.
I saw on the forum that it is recommended to disable the docker firewall and hang containers in the sale on host

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2021-04-05
@q2digger

stop docker. save the rules. run docker.
docker rules will now be added on top of your rules. for you, as a server administrator, only the DOCKER-USER chain is important from the docker rules, you can add prohibiting and allowing rules related to your containers there.

A
Andrey Barbolin, 2021-04-07
@dronmaxman

If you use FERM (>2.4) to manage iptables, then you can set up an exception for docker.
https://www.lullabot.com/articles/convincing-docke...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question