mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Fail2ban RHEL configuration
This commit is contained in:
parent
cf3ed3e9f5
commit
b79338b5a9
3 changed files with 59 additions and 0 deletions
10
install/rhel/fail2ban.action.conf
Normal file
10
install/rhel/fail2ban.action.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Fail2Ban configuration file for vesta
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
actionstart = /usr/local/vesta/bin/v-add-firewall-chain <name>
|
||||||
|
actionstop = /usr/local/vesta/bin/v-delete-firewall-chain <name>
|
||||||
|
actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-<name>[ \t]'
|
||||||
|
actionban = /usr/local/vesta/bin/v-add-firewall-ban <ip> <name>
|
||||||
|
actionunban = /usr/local/vesta/bin/v-delete-firewall-ban <ip> <name>
|
||||||
|
|
10
install/rhel/fail2ban.filter.conf
Normal file
10
install/rhel/fail2ban.filter.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Fail2Ban filter for unsuccesfull Vesta authentication attempts
|
||||||
|
#
|
||||||
|
|
||||||
|
[INCLUDES]
|
||||||
|
before = common.conf
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
failregex = .* <HOST> failed to login
|
||||||
|
ignoreregex =
|
||||||
|
|
39
install/rhel/fail2ban.jail.conf
Normal file
39
install/rhel/fail2ban.jail.conf
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
[ssh-iptables]
|
||||||
|
enabled = true
|
||||||
|
filter = sshd
|
||||||
|
action = vesta[name=SSH]
|
||||||
|
logpath = /var/log/secure
|
||||||
|
maxretry = 5
|
||||||
|
|
||||||
|
[vsftpd-iptables]
|
||||||
|
enabled = false
|
||||||
|
filter = vsftpd
|
||||||
|
action = vesta[name=FTP]
|
||||||
|
logpath = /var/log/vsftpd.log
|
||||||
|
maxretry = 5
|
||||||
|
|
||||||
|
[exim-iptables]
|
||||||
|
enabled = true
|
||||||
|
filter = exim
|
||||||
|
action = vesta[name=MAIL]
|
||||||
|
logpath = /var/log/exim/main.log
|
||||||
|
|
||||||
|
[dovecot-iptables]
|
||||||
|
enabled = true
|
||||||
|
filter = dovecot
|
||||||
|
action = vesta[name=MAIL]
|
||||||
|
logpath = /var/log/dovecot.log
|
||||||
|
|
||||||
|
[mysqld-iptables]
|
||||||
|
enabled = true
|
||||||
|
filter = mysqld-auth
|
||||||
|
action = vesta[name=DB]
|
||||||
|
logpath = /var/log/mysqld.log
|
||||||
|
maxretry = 5
|
||||||
|
|
||||||
|
[vesta-iptables]
|
||||||
|
enabled = true
|
||||||
|
filter = vesta
|
||||||
|
action = vesta[name=VESTA]
|
||||||
|
logpath = /var/log/vesta/auth.log
|
||||||
|
maxretry = 5
|
Loading…
Add table
Add a link
Reference in a new issue