-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to ban hosts in iptables (from apache-auth) #288
Comments
can you do the following and if so what's it output. iptables -n -L INPUT | grep -q 'fail2ban-apache-auth[ \t]' can you also use strace (package by the same name); strace -fe trace=process -o /tmp/strace.txt -p {pid_of_fail2ban} and attach a link to a pastebin of it. |
Grep on iptables doesn't print anything. I had to start strace in different way to create useful log: |
On Thu, 11 Jul 2013, Marcel Dopita wrote:
yikes -- what is #12 here? on Debian systems it just uses '\n' as 2013-06-19 22:15:17,439 fail2ban.comm : DEBUG Command: ['set', 'ssh', 'actionstop', 'iptables-multiport', 'iptables -D -p -m multiport --dports -j fail2ban-\niptables -F fail2ban-\niptables -X fail2ban-'] I wonder if this is just a logging module customization on centos to replace
z<31> -- what is that about?
do you mean that ubuntu's jail.conf (alone) was good enough or entire Yaroslav O. Halchenko, Ph.D. |
ah -- right -- the problem with troubleshooting is that stdout/err is
or smth like that and then see what appears in the server terminal Yaroslav O. Halchenko, Ph.D. |
This is what I get from fail2ban-server:
Previously I only tried fail2ban on Ubuntu but applying following basic config seems to work on my Centos machine as well:
It doesn't matter if I use "http,https" or "80,443". |
@moneytoo Your jail specifies |
@kwirk So does this mean that actions such as |
@moneytoo Hopefully all is working now? If so, please go ahead and close the issue. Thanks 😄 |
I confirm it fixes my issues. I thought about this but I just couldn't believe that some sample jails are not functional. Such handy piece of software has to be used by many admins... Thanks |
Well -- there are two side of the coin
On Fri, 12 Jul 2013, Marcel Dopita wrote:
Yaroslav O. Halchenko, Ph.D. |
Even after fixing issue with apache-auth detection (#286, Thanks!), I'm still unable to make fail2ban add bans to iptables.
Since I'm on Centos, I have to use iptables. I duplicated my issue on clean Centos 6.4 installation. Iptables are started and with basic config generated by
system-config-firewall-tui
.Modification of
jail.conf
:However I see errors when fail2ban starts and tries to ban host:
I also tried fail2ban on Ubuntu from their repo. They have
jail.conf
preconfigured a bit and it works just fine. I'm really not sure what could be wrong with my setup because fail2ban setup seems clear (I hope).The text was updated successfully, but these errors were encountered: