您好,登錄后才能下訂單哦!
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install fail2ban
sed -i "50s#ignoreip = 127.0.0.1/8#ignoreip = 127.0.0.1/8 113.108.131.85/24#" /etc/fail2ban/jail.conf
sed -i "59s#bantime = 600#bantime = 7200#" /etc/fail2ban/jail.conf
sed -i "63s#findtime = 600#findtime = 86400#" /etc/fail2ban/jail.conf
sed -i "129s/destemail = root@localhost/destemail = t891958201@126.com/" /etc/fail2ban/jail.conf
sed -i "216a enabled = true" /etc/fail2ban/jail.conf
sed -i "218a action = iptables[name=SSH, port=ssh, protocol=tcp]" /etc/fail2ban/jail.conf
sed -i '219a sendmail-whois[name=SSH, dest=t891958201@126.com, sender=root@localhost, sendername="Fail2Ban"]' /etc/fail2ban/jail.conf
sed -i '220s#^# #' /etc/fail2ban/jail.conf
sed -i "220a bantime = 7200" /etc/fail2ban/jail.conf
sed -i "221a findtime = 86400" /etc/fail2ban/jail.conf
sed -i "222a maxretry = 5" /etc/fail2ban/jail.conf
sed -i "230a enabled = true" /etc/fail2ban/jail.conf
sed -i "232a action = iptables[name=ssh-ddos, port=ssh,sftp protocol=tcp,udp]" /etc/fail2ban/jail.conf
sed -i '233a sendmail-whois[name=SSH, dest=t1934844044@126.com, sender=root@localhost, sendername="Fail2Ban"]' /etc/fail2ban/jail.conf
sed -i '234s#^# #' /etc/fail2ban/jail.conf
sed -i "234a bantime = 7200" /etc/fail2ban/jail.conf
sed -i "235a findtime = 86400" /etc/fail2ban/jail.conf
sed -i "236a maxretry = 5" /etc/fail2ban/jail.conf
service fail2ban start
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。