您好,登錄后才能下訂單哦!
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
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。