From 433f098d3da1f513f2f3952fb7a2be4e6fb1e470 Mon Sep 17 00:00:00 2001 From: q3aql Date: Tue, 16 Apr 2024 23:06:00 +0200 Subject: [PATCH] Fix iptables command --- blockauth | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockauth b/blockauth index 445ddae..9e743bc 100755 --- a/blockauth +++ b/blockauth @@ -116,8 +116,8 @@ function run_iptables() { iptables -F ipset destroy blockauth 2> /dev/null ipset create blockauth hash:ip - iptables -A INPUT -p tcp -m multiport --sports ${1} -m set --match-set blockauth src -j DROP - iptables -A OUTPUT -p tcp -m multiport --sports ${1} -m set --match-set blockauth src -j DROP + iptables -I INPUT -p tcp -m multiport --dports ${1} -m set --match-set blockauth src -j DROP + iptables -I OUTPUT -p tcp -m multiport --dports ${1} -m set --match-set blockauth src -j DROP } # Reset initial configuration