Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Fail2ban installation configuration

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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 pound 8 113.108.131.85 Universe" / etc/fail2ban/jail.conf

Sed-I "59s#bantime = 600#bantime = 720" / etc/fail2ban/jail.conf

Sed-I "63s#findtime = 600#findtime = 8640 stories" / 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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report