From c08fd0af7f994654e26599834c73f8be201dfe90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Tue, 26 Sep 2023 01:58:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=20fail2ban=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/fail2ban/install.sh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/scripts/fail2ban/install.sh b/scripts/fail2ban/install.sh index a3109c3d71..30fcdec9f9 100644 --- a/scripts/fail2ban/install.sh +++ b/scripts/fail2ban/install.sh @@ -59,18 +59,6 @@ bantime = 86400 action = %(action_mwl)s logpath = /var/log/secure # ssh-END - -# pure-ftpd-START -[pure-ftpd] -enabled = true -filter = pure-ftpd -port = 21 -maxretry = 5 -findtime = 300 -bantime = 86400 -action = %(action_mwl)s -logpath = /var/log/messages -# pure-ftpd-END EOF # 替换端口 sshPort=$(cat /etc/ssh/sshd_config | grep 'Port ' | awk '{print $2}') @@ -78,15 +66,6 @@ if [ "${sshPort}" == "" ]; then sshPort="22" fi sed -i "s/port = 22/port = ${sshPort}/g" /etc/fail2ban/jail.local -if [ -f "/www/server/pure-ftpd/etc/pure-ftpd.conf" ]; then - ftpPort=$(cat /www/server/pure-ftpd/etc/pure-ftpd.conf | grep "Bind" | awk '{print $2}' | awk -F "," '{print $2}') -fi -if [ "${ftpPort}" == "" ]; then - ftpPort="21" - sed -i "s/port = 21/port = ${ftpPort}/g" /etc/fail2ban/jail.local -else - sed -i "s/port = 21/port = ${ftpPort}/g" /etc/fail2ban/jail.local -fi # Debian 的特殊处理 if [ "${OS}" == "debian" ]; then