Update simplefirewall.sh

Reorder commands
This commit is contained in:
iamromulan
2024-01-02 00:48:01 -05:00
committed by GitHub
parent 805749e916
commit 76880055e5

View File

@@ -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