Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple containers for banning multiple chains? #17

Closed
verybadsoldier opened this issue Feb 26, 2019 · 2 comments
Closed

Multiple containers for banning multiple chains? #17

verybadsoldier opened this issue Feb 26, 2019 · 2 comments

Comments

@verybadsoldier
Copy link

One question please:
Why is it adviced to use a second container when banning with iptables the chain DOCKER-USER and INPUT at the same time as shown here:
https://github.com/crazy-max/docker-fail2ban/blob/master/examples/compose-multi/docker-compose.yml

Wouldn't it be enough to use just one container and extend the used action to just add the second chain to iptables?

Something like this:

actionstart = <iptables> -N f2b-<name>
              <iptables> -A f2b-<name> -j <returntype>
              <iptables> -I INPUT -p <protocol> -j f2b-<name>
              <iptables> -I DOCKER-USER -p <protocol> -j f2b-<name>
@crazy-max
Copy link
Owner

@verybadsoldier This would make the iptables rules more cumbersome but it could work. I'll think about this implementation.

@crazy-max
Copy link
Owner

@verybadsoldier F2B_IPTABLES_CHAIN env var has been removed and README updated to use chain = <name> def. See also #46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants