|
|
@ -15,7 +15,7 @@ EOF |
|
|
|
$OUT .= " /sbin/iptables --append \$NEW_Fail2Ban -s $ip"; |
|
|
|
$OUT .= " /sbin/iptables --append \$NEW_Fail2Ban -s $ip"; |
|
|
|
$OUT .= " -p $proto" if ($proto =~ m/^tcp|udp|icmp$/); |
|
|
|
$OUT .= " -p $proto" if ($proto =~ m/^tcp|udp|icmp$/); |
|
|
|
$OUT .= " -m multiport --dports $port" if ($proto =~ m/^tcp|udp$/ && $port =~ m/^\d+(,\d+)*$/); |
|
|
|
$OUT .= " -m multiport --dports $port" if ($proto =~ m/^tcp|udp$/ && $port =~ m/^\d+(,\d+)*$/); |
|
|
|
$OUT .= " -j denylog\n" |
|
|
|
$OUT .= " -j denylog\n"; |
|
|
|
$OUT .= " /sbin/iptables --append \$NEW_Fail2Ban" . |
|
|
|
$OUT .= " /sbin/iptables --append \$NEW_Fail2Ban" . |
|
|
|
" -j RETURN\n"; |
|
|
|
" -j RETURN\n"; |
|
|
|
} |
|
|
|
} |
|
|
|