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. 2
      root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustFail2Ban

@ -16,10 +16,10 @@ 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" . $OUT .= " /sbin/iptables --append \$NEW_Fail2Ban" .
" -j RETURN\n"; " -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.
$OUT .=<<'EOF'; $OUT .=<<'EOF';

Loading…
Cancel
Save