From 76880055e5a127d520dc661f1856223e88f11fa9 Mon Sep 17 00:00:00 2001 From: iamromulan <50184035+iamromulan@users.noreply.github.com> Date: Tue, 2 Jan 2024 00:48:01 -0500 Subject: [PATCH] Update simplefirewall.sh Reorder commands --- simplefirewall/simplefirewall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simplefirewall/simplefirewall.sh b/simplefirewall/simplefirewall.sh index 409ef31..04af1de 100644 --- a/simplefirewall/simplefirewall.sh +++ b/simplefirewall/simplefirewall.sh @@ -5,8 +5,8 @@ PORTS=("80" "8080" "8088" "443") # Default ports, will be modified by the instal # Block specified ports on all interfaces except bridge0, eth0, and tailscale0 for port in "${PORTS[@]}"; do + iptables -A INPUT -p tcp --dport $port -j DROP iptables -A INPUT -i bridge0 -p tcp --dport $port -j ACCEPT iptables -A INPUT -i eth0 -p tcp --dport $port -j ACCEPT iptables -A INPUT -i tailscale0 -p tcp --dport $port -j ACCEPT - iptables -A INPUT -p tcp --dport $port -j DROP done