Created
May 14, 2018 09:27
-
-
Save teimur8/ce11209d968cd63eddf4d4bbb85f1a7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://www.8host.com/blog/zashhita-ssh-s-pomoshhyu-fail2ban-centos-6/ | |
| [DEFAULT] | |
| ignoreip = 127.0.0.1 | |
| bantime = 3600 | |
| findtime = 600 | |
| maxretry = 3 | |
| [ssh-iptables] | |
| enabled = true | |
| filter = sshd | |
| action = iptables[name=SSH, port=ssh, protocol=tcp] | |
| # sendmail-whois[name=SSH, dest=root, [email protected]] | |
| logpath = %(sshd_log)s | |
| maxretry = 5 | |
| systemctl reload fail2ban | |
| tail -f /var/log/fail2ban.log | |
| iptables -L | |
| service fail2ban status | |
| systemctl enable fail2ban | |
| ## https://losst.ru/nastrojka-fail2ban-centos-7 | |
| ## https://www.dmosk.ru/instruktions.php?object=fail2ban | |
| # | |
| #cat /etc/fail2ban/jail.conf | |
| #[sshd] | |
| #enabled = true | |
| #port = ssh | |
| #logpath = %(sshd_log)s | |
| #backend = %(sshd_backend)s | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment