User Tools

Site Tools


software:linux:fail2ban

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

software:linux:fail2ban [2015/01/02 13:52] – created Michele Porellisoftware:linux:fail2ban [2015/01/09 09:22] (current) – [/etc/fail2ban/action.d/repeatoffender.conf] Michele Porelli
Line 90: Line 90:
             ADD="<ip> # fail2ban/$( date '+%%Y-%%m-%%d %%T' ): Perma-Banned"             ADD="<ip> # fail2ban/$( date '+%%Y-%%m-%%d %%T' ): Perma-Banned"
             FILE=/etc/fail2ban/ip.blocklist.<name>             FILE=/etc/fail2ban/ip.blocklist.<name>
-            grep -q "$VERIFY" "$FILE" || iptables -I fail2ban-<name> 1 -s <ip> -j+            grep -q "$VERIFY" "$FILE" || iptables -I fail2ban-<name> 1 -s <ip> -j REJECT --reject-with icmp-port-unreachable
             grep -q "$VERIFY" "$FILE" || echo "$ADD" >> "$FILE"             grep -q "$VERIFY" "$FILE" || echo "$ADD" >> "$FILE"
  
software/linux/fail2ban.1420206755.txt · Last modified: (external edit)