Linux - VSFTPD Brute Force Attacks
yum install fail2ban
vi /etc/fail2ban.conf
[VSFTPD]
enabled = true
logfile = /var/log/vsftpd.log
port = ftp
timepattern = %%b %%d %%H:%%M:%%S
failregex = FAIL LOGIN
iptables -I INPUT -p tcp --dport ftp -j fail2ban-ftp
iptables -A fail2ban-ftp -j RETURN
iptables -F fail2ban-ftp
iptables -X fail2ban-ftp
fwban = iptables -I fail2ban-ftp 1 -s
fwunban = iptables -D fail2ban-ftp -s
vi /etc/vsftpd/vsftpd.conf
xferlog_enable=YES
#xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
#log_ftp_protocol=YES
dual_log_enable=YES
use_localtime=YES
service fail2ban start
Comments
Post a Comment