Replies: 1 comment
-
OK. But why you need 2 chains in fail2ban, if you add every IP to both?..
Two actions (also if the chain is the same) would cause that
and the action would contain something like that: actionstart = <iptables> -N f2b-<name>
<iptables> -A f2b-<name> -j <returntype>
for chain in $(echo '<chain>' | sed 's/,/ /g'); do
<iptables> -I "$chain" -p <protocol> -m multiport --dports <port> -j f2b-<name>
done (and same for actionstop).
[sendmail-auth]
banaction = iptables-multiport[actionstart=""]
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two chains - need this to (dis)allow different ip addresses/IP blocks/countries
I want to be able have fail2ban use the same chain to reject incoming connections.
In jail.local I have
While this works perfectly (f2b-sendmail-auth inserted as first item in both chains) I end up with two ip addresses added to the "f2b-sendmail-auth" chain everytime a new ip address is blocked.
How can I prevent this?
thanks
Beta Was this translation helpful? Give feedback.
All reactions