-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Problem with ufwban #913
Comments
Thanks for reporting. Looks like the new jail is having issues |
First test : nextcloudpi raspberry image |
Please, run the update to |
We'll reopen if this isn't fixed yet |
Fixed. Thanks. |
I had the same issue on v1.13.6, running on an HC1.
`/etc/fail2ban/filter.d/ufwban.conf didn't exist, so I created it based on #704. After that, fail2ban continued to fail reporting that If fail2ban relies on ufw being active, maybe the wizard should install ufw by default, too? |
@dhiltonp thanks for reporting. It shouldn't require UFW. If that's the case I'll revert the changes. Did you find a way of making fail2ban just ignore the rule if the log doesn't exist? |
It seems that fail2ban jails must be Adding a little code to fail2ban.sh to make that dynamic could work. UFW could call fail2ban.sh if fail2ban is installed. fail2ban.sh would rebuild the jail.conf with a dynamic enable, based on whether or not UFW is installed... |
Could use |
Sure. Is there a corresponding 'uninstall UFW' script? |
no uninstall, but it can be disabled |
That PR only enables It is not robust against UFW being removed or disabled afterwards, though. I guess we could modify It would just be a sed command in our fail2ban.sh. If so, the other PR wouldn't be needed. |
touching the file sounds better, yes |
See #937 for that patch. The potential downside is if the fail2ban package is upgraded, it likely will replace the init script. |
Filter for ufwban should be: HOST and <> must be complex. It will not appear on this website! If not, you get this error message: ERROR No 'host' group in 'UFW BLOCK.* SRC=' |
Hi, I can't use fail2ban anymore.
Ufw is activated
Modsecurity is activated
I've clean files and made a clean install but always the same issue.
Datadir : external hdd
Ncp-panel :
[ fail2ban ]
System config value loglevel set to string 2
System config value log_type set to string file
Job for fail2ban.service failed because the control process exited with error code.
See "systemctl status fail2ban.service" and "journalctl -xe" for details.
fail2ban enabled
Journal :
Unit fail2ban.service has begun starting up. May 30 15:03:34 nextcloudpi kernel: [UFW BLOCK] IN=eth0 OUT= MAC=01:00:ad SRMay 30 15:03:40 nextcloudpi kernel: [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e: SRMay 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING Wrong value for 'dbpurgeage' in 'Definition'. Using default one: '86400' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING 'backend' not defined in 'ssh'. Using default one: 'auto' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING 'backend' not defined in 'nextcloud'. Using default one: 'auto' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: ERROR Found no accessible config files for 'filter.d/ufwban' under /etc/fail2ban May 30 15:03:44 nextcloudpi fail2ban-client[24290]: ERROR No section: 'Definition' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: ERROR Unable to read the filter May 30 15:03:44 nextcloudpi fail2ban-client[24290]: ERROR Errors in jail 'ufwban'. Skipping... May 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING 'filter' not defined in 'sshd'. Using default one: '' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING No filter set for jail sshd May 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING 'backend' not defined in 'sshd'. Using default one: 'auto' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: WARNING 'filter' not defined in 'sshd'. Using default one: '' May 30 15:03:44 nextcloudpi fail2ban-client[24290]: ERROR Failed during configuration: Bad value substitution: option 'action' in section 'sshd'May 30 15:03:44 nextcloudpi systemd[1]: fail2ban.service: Control process exited, code=exited status=255 May 30 15:03:44 nextcloudpi systemd[1]: Failed to start Fail2Ban Service. -- Subject: Unit fail2ban.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit fail2ban.service has failed. -- -- The result is failed. May 30 15:03:44 nextcloudpi systemd[1]: fail2ban.service: Unit entered failed state. May 30 15:03:44 nextcloudpi systemd[1]: fail2ban.service: Failed with result 'exit-code'
The text was updated successfully, but these errors were encountered: