Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- yum install epel-release
- yum install fail2ban
- systemctl enable fail2ban
- nano /etc/fail2ban/jail.local
- [DEFAULT]
- # Ban hosts for one hour:
- bantime = 3600
- # Override /etc/fail2ban/jail.d/00-firewalld.conf:
- banaction = iptables-multiport
- [sshd]
- enabled = true
- #untuk http auth
- [nginx-http-auth]
- enabled = true
- #restart fail2ban
- systemctl restart fail2ban
- #check fail2ban status
- fail2ban-client status
- #additional setting
- nano /etc/fail2ban/jail.conf
- ignoreip = 127.0.0.1/8
- #tambah ignoreip = 127.0.0.1/8 ipserver1
- bantime = 600
- findtime = 600
- maxretry = 3
- #cek log
- tail -F /var/log/fail2ban.log
- #unbanip
- fail2ban-client set ssh unbanip 10.0.0.20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement