(06-28-2015, 07:06 AM)bbspike Wrote: Hi there,
I have made a little script to install fail2ban for Sentora Centos 7.
The script will do the follow:
- Disable firewalld as fail2ban for Sentora will use iptables
- install iptables
-configuring common ports for iptables (please check if you have custom ports open)
- Install fail2ban
- Download de files for Sentora from my server
- Install the filters for Sentora
- Replace the jail.local for Sentora
- start iptbales and fail2ban
Please read the follow:
Only for centos 7 for now
Not possible to use firewalld after install
Make sure you add your own ports to iptables after install
Test it first
Code:bash <(curl -L -Ss http://park.webimproved.nl/fail2ban/install.sh)
It comes with the following jails:
Proftpd
Ssh
Apache
Dovecot
Postfix
You may want tot edit the jail.local file in /etc/fail2ban tot enable email notification. Here you can also edit the ban times, retry failers and search time.
Hi! I´ll paste my log: fail2ban is working, but some errors during installation appeared:
Code:
Checking that minimal requirements are ok
Detected : CentOs 7 x86_64
Ok.
Failed to issue method call: Unit firewalld.service not loaded.
ln -s '/usr/lib/systemd/system/iptables.service' '/etc/systemd/system/basic.target.wants/iptables.service'
libkmod: kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
Installing : kernel-.10.0-229.11.1.el7.x86_64 2/10
grubby fatal error: unable to find a suitable template