apt update -y && apt install fail2ban -y
CentOS / Redhat
yum update && yum install fail2ban -y
Activated Jail list
Actions under a jail
iptables -L -n
How to start / stop / restart
service fail2ban start service fail2ban stop service fail2ban restart
How to ban/unban an IP?
fail2ban-client set JAILNAME banip IP_ADDRESS fail2ban-client set JAILNAME unbanip IP_ADDRESS
Wants to Permanent Whitelist an IP?
Then fine the line called ignoreip= 127.0.0.1/8
There, you will just need to add the IP with space.
ignoreip = 127.0.0.1/8 126.96.36.199 If you see # symbol infront of ignoreip, please remove that. 188.8.131.52 IP has been whitelisted in the above example