Skip to content

Commit 0277d84

Browse files
authored
improve fail2ban support for vsftpd
1 parent 92a4c2f commit 0277d84

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

install/vst-install-ubuntu.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,15 @@ if [ "$fail2ban" = 'yes' ]; then
11581158
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
11591159
sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
11601160
fi
1161+
if [ "$vsftpd" = 'yes' ]; then
1162+
#Create vsftpd Log File
1163+
if [ ! -f "/var/log/vsftpd.log" ]; then
1164+
touch /var/log/vsftpd.log
1165+
fi
1166+
fline=$(cat /etc/fail2ban/jail.local |grep -n vsftpd-iptables -A 2)
1167+
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
1168+
sed -i "${fline}s/false/true/" /etc/fail2ban/jail.local
1169+
fi
11611170
update-rc.d fail2ban defaults
11621171
service fail2ban start
11631172
check_result $? "fail2ban start failed"

0 commit comments

Comments
 (0)