I released a first version of fail2ban, for now there is no gui, but I’m not sure that it is really needed, since it is something which works in the background
Obviously this needs to be tested on real servers exposed to the Internet so look after fail2ban daily :
you can look after the administrative emails sent to the admin or custom recipients
you can look after the command fail2ban-listban to see the number of banned IP
you can look after the command fail2ban-client status to see if fail2ban is running with configured jails
you can test the activated jails (do fail2ban-client status and looks after jail name) and try to be banned by fail2ban. IP on your local network cannot be banned except if you set BanLocalNetwork to enabled
when you want to unban an IP do : fail2ban-unban
well I’m looking for your returns, and of course by ideas, new jails, etc
For example Nginx could be more protected, I have just activated the default jails, but we can find more jails on internet.
Fun I tried but without successes, but when I read the /filter.d/apache-overflow.conf I don’t have the feeling that the jail is made to block a host which is doing a huge number of requests. You can verify what occurred in the fail2ban log
I tried with successes sogo-auth, roundcube-auth, pam-generic, vsftpd and sshd
[root@nethserver httpd]# fail2ban-listban
Look after a jail, do : fail2ban-client status {JailName}
Count the number of IP Banned
apache-auth Jail
- Currently banned: 0 - Total banned: 0
apache-badbots Jail
- Currently banned: 0 - Total banned: 0
apache-fakegooglebot Jail
- Currently banned: 0 - Total banned: 0
apache-modsecurity Jail
- Currently banned: 0 - Total banned: 0
apache-nohome Jail
- Currently banned: 0 - Total banned: 0
apache-noscript Jail
- Currently banned: 0 - Total banned: 0
apache-overflows Jail
- Currently banned: 0 - Total banned: 0
apache-scan Jail
- Currently banned: 0 - Total banned: 2
apache-shellshock Jail
- Currently banned: 0 - Total banned: 0
dovecot Jail
- Currently banned: 0 - Total banned: 0
ejabberd-auth Jail
- Currently banned: 0 - Total banned: 0
mysqld-auth Jail
- Currently banned: 0 - Total banned: 0
pam-generic Jail
- Currently banned: 0 - Total banned: 0
postfix Jail
- Currently banned: 0 - Total banned: 0
postfix-rbl Jail
- Currently banned: 0 - Total banned: 0
recidive Jail
- Currently banned: 0 - Total banned: 0
sieve Jail
- Currently banned: 0 - Total banned: 0
sogo-auth Jail
- Currently banned: 0 - Total banned: 0
sshd Jail
- Currently banned: 0 - Total banned: 20
sshd-ddos Jail
- Currently banned: 0 - Total banned: 0
maybe, but changing port will lower (almost) to zero all the problems, meaning that all script kiddies and bots won’t affect you…
obiously a portscan will reveal your real sshd port, but it’s something that can’t be done in a silent way… in this case, fail2ban is a great help
BTW, if only key access is enabled, i.e. no password auth allowed, using a not standard port will let you sleep like a baby
right, with a no root account accepted also, you will live at fort knox…but for other services like apache, postfix, dovecot…and much others, you cannot use non standard ports except if you are alone (or with few known people) to use the server
the main difference is that if someone break your server via http, gaining root privileges is quite difficult (using RH/Centos rpm at least), while breaking your ssh account (root anyone?) they already have them
BTW, everything that can be moved on not standard ports must be moved… the log flooding is a good way to hide many things (for attacker) and to miss the same things (for admin)
I tested fail2ban in lab, failing logins over ssh and imaps: it correctly banned me.
I will ask @giacomo to install it on www.nethserver.org to see how it behaves on the real world.
The only thing I’d like to change it’s Mail=disabled by default. Because I received about 50 email for every started/stopped jail. I know there’s a workaround, but I still hope that fail2ban improves over time and will offer an option to receive emails only for bans (and while at it, disable whois).