Only return after all the rules have been inserted, not between each rules (in masq templates)

tags/0.0.1
Daniel Berteaud 12 years ago
parent 77662adefd
commit 613b3220ef
  1. 4
      root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustFail2Ban

@ -16,9 +16,9 @@ EOF
$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" .
" -j RETURN\n";
} }
$OUT .= " /sbin/iptables --append \$NEW_Fail2Ban" .
" -j RETURN\n";
} }
# Having created a new Fail2Ban chain, activate it and destroy the old. # Having created a new Fail2Ban chain, activate it and destroy the old.

Loading…
Cancel
Save