View previous topic :: View next topic |
Author |
Message |
alienjon Veteran


Joined: 09 Feb 2005 Posts: 1726
|
Posted: Sun Mar 03, 2019 4:39 pm Post subject: fail2ban not creating iptables rules |
|
|
I'd had fail2ban up and running for a little while now, but I recently wanted to have a review of my iptables rules. Documentation states that fail2ban is supposed to automatically create it's own rules (which makes sense) but after I revamped my iptables and restarted fail2ban, none of the rules were added. I do get my e-mail notifications from fail2ban and the init.d script shows that it's running, but I find it hard to believe it'll do anything without the rules to enforce them. Any thoughts? |
|
Back to top |
|
 |
Syl20 l33t


Joined: 04 Aug 2005 Posts: 621 Location: France
|
Posted: Mon Mar 04, 2019 4:46 pm Post subject: |
|
|
What does fail2ban say (to syslog) when you restart the service ? |
|
Back to top |
|
 |
alienjon Veteran


Joined: 09 Feb 2005 Posts: 1726
|
Posted: Wed Mar 06, 2019 1:49 am Post subject: |
|
|
Quote: | What does fail2ban say (to syslog) when you restart the service ? | Nothing new, I'm afraid.
I did a bit more digging and found that apparently the iptables rules aren't supposed to be created UNTIL criteria for a filter has been met (in other words, the rule is created on the fly and not when the service starts). Only problem is, that I won't be able to know that for certain until one of my jails triggers. |
|
Back to top |
|
 |
Syl20 l33t


Joined: 04 Aug 2005 Posts: 621 Location: France
|
Posted: Mon Mar 11, 2019 4:19 pm Post subject: |
|
|
alienjon wrote: | apparently the iptables rules aren't supposed to be created UNTIL criteria for a filter has been met (in other words, the rule is created on the fly and not when the service starts). |
I discover this "lazy initialization" too.
https://github.com/fail2ban/fail2ban/issues/2167
https://github.com/fail2ban/fail2ban/pull/1742
I can't verify now (the proxies at work forbid it), but I believe fail2ban still creates its own chains when starting, on my home firewall... Perhaps I enabled or disabled some related parameters, a long long time ago. Will check. |
|
Back to top |
|
 |
|