Fail2ban for Sentora (Centos 7)
06-28-2015, 07:06 AM
(This post was last modified: 01-07-2016, 10:36 PM by bbspike.)
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
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.
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.