fail2ban安装配置-创新互联

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

创新互联自2013年起,是专业互联网技术服务公司,拥有项目成都网站建设、成都网站制作网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元金林做网站,已为上家服务,为金林各地企业和个人服务,联系电话:18982081108

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

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页题目:fail2ban安装配置-创新互联
文章来源:http://cdiso.cn/article/cdsjds.html

其他资讯