outroll / vesta

VESTA Control Panel
http://vestacp.com
GNU General Public License v3.0
2.97k stars 1.03k forks source link

/etc/fail2ban/jail.local #1979

Open Killua99x opened 4 years ago

Killua99x commented 4 years ago

Operating System (OS/VERSION):

Type here, e.g. CentOS 7.7.1908

VestaCP Version:

0.9.8 (x86_64) | Release:26

Installed Software (what you got with the installer):

https://prnt.sc/r8h77a


`[ssh-iptables] enabled = true filter = sshd action = vesta[name=SSH] logpath = /var/log/secure maxretry = 3

[vsftpd-iptables] enabled = false filter = vsftpd action = vesta[name=FTP] logpath = /var/log/vsftpd.log maxretry = 3

[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 = false filter = mysqld-auth action = vesta[name=DB] logpath = /var/log/mysqld.log maxretry = 3

[vesta-iptables] enabled = true filter = vesta action = vesta[name=VESTA] logpath = /var/log/vesta/auth.log maxretry = 3 ` When i put [vsftpd-iptables] and [mysqld-iptables] to "true" fail2ban stop working...

I think that's a bug.

alex-connor commented 4 years ago

Check for a file /var/log/mysqld.log on the server. If the file does not exist, then the reason is that the fail2ban cannot find it, gives an error and stops working

Killua99x commented 4 years ago

i don't have it, but i have the same problem with vsftpd

alex-connor commented 4 years ago

if you used proftpd during installation, then why do you need the rule for vsftpd?

Killua99x commented 4 years ago

yes my error, i need it for mysql and proftpd, sorry, my mistake...

Killua99x commented 4 years ago

`[ssh-iptables] enabled = true filter = sshd action = vesta[name=SSH] logpath = /var/log/secure maxretry = 3

dont touch vsftpd options

im using proftpd

[vsftpd-iptables] enabled = false filter = vsftpd action = vesta[name=FTP] logpath = /var/log/vsftpd.log maxretry = 3

[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

logpath = /var/log/mariadb/mariadb.log maxretry = 3

[vesta-iptables] enabled = true filter = vesta action = vesta[name=VESTA] logpath = /var/log/vesta/auth.log maxretry = 3 `

thanks and sorry, really my mistake... how can i set rules for proftpd ? thanks in advance and sorry

Killua99x commented 4 years ago

I still write how I think I solved it, maybe someone could be useful

i put to proftpd config this

LogFormat eos "%a: user=%U disconnect_reason=\"%E\"" ExtendedLog /var/log/proftpd/ext.log EXIT eos

after

`[ssh-iptables] enabled = true filter = sshd action = vesta[name=SSH] logpath = /var/log/secure maxretry = 3

dont touch vsftpd options

im using proftpd

[vsftpd-iptables] enabled = false filter = vsftpd action = vesta[name=FTP] logpath = /var/log/vsftpd.log maxretry = 3

[proftpd-iptables] enabled = true filter = proftpd action = vesta[name=FTP] logpath = /var/log/proftpd/ext.log maxretry = 3

[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

dont touch mysql options

[mysqld-iptables] enabled = true filter = mysqld-auth action = vesta[name=DB]

logpath = /var/log/mysqld.log

logpath = /var/log/mariadb/mariadb.log maxretry = 3

[vesta-iptables] enabled = true filter = vesta action = vesta[name=VESTA] logpath = /var/log/vesta/auth.log maxretry = 3 `

if someone sees some error or thinks that the configuration is not done properly, please answer me, thanks in advance