X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/blobdiff_plain/ce79e94a94afdadb090256df777940516eca40df..e91f4bbf73b2117374ce030959f75b7c7d8fae4a:/functions.m4 diff --git a/functions.m4 b/functions.m4 index 5cc70f8..fd24364 100644 --- a/functions.m4 +++ b/functions.m4 @@ -85,7 +85,7 @@ clearchain () { *:*) table=${chain%:*} chain=${chain#*:} ;; *) table=filter ;; esac - run ip46tables -t $table -N $chain + run ip46tables -t $table -N $chain 2>/dev/null || : done } @@ -104,7 +104,9 @@ errorchain () { run ip46tables -t $table -A $chain -j LOG \ -m limit --limit 3/minute --limit-burst 10 \ --log-prefix "fw: $chain " --log-level notice - run ip46tables -t $table -A $chain -j "$@" + run ip46tables -t $table -A $chain -j "$@" \ + -m limit --limit 20/second --limit-burst 100 + run ip46tables -t $table -A $chain -j DROP } m4_divert(24)m4_dnl