Tag: fail2ban
sudo apt install fail2ban
#banaction = iptables-multiport banaction = ufw
[apache-403] enabled = true filter = apache-403 logpath = /var/log/apache2/access.log action = ufw maxretry = 10 findtime = 30 bantime = 1800 [apache-404] enabled = true filter = apache-404 logpath = /var/log/apache2/access.log action = ufw maxretry = 10 findtime = 30 bantime = 1800
[Definition] failregex = ^<HOST>.*"(GET|POST).*" 403 .*$ # フィルター ignoreregex = 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 # ホワイトリスト
[Definition] failregex = ^<HOST>.*"(GET|POST).*" 403 .*$ # フィルター ignoreregex = 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 # ホワイトリスト