From 6cab32c19ecca07eb76d962d5162aa7ec0dffc69 Mon Sep 17 00:00:00 2001 From: OldTyT Date: Mon, 19 Aug 2024 12:06:46 +0000 Subject: [PATCH] fix: custom firewall j2 --- templates/custom.firewall-restore.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/custom.firewall-restore.j2 b/templates/custom.firewall-restore.j2 index b3c13cb..d086ef2 100644 --- a/templates/custom.firewall-restore.j2 +++ b/templates/custom.firewall-restore.j2 @@ -14,9 +14,9 @@ iptables -N enemy_input iptables -I INPUT 1 -i {{ whitelist_interface }} -j enemy_input iptables -N DOCKER-USER iptables -I DOCKER-USER 1 -i {{ whitelist_interface }} -j enemy_input -iptables -I enemy_input 1 -p tcp -m set --match-set {{ whitelist_ports_tcp }} dst -m set --match-set {{ whitelist_ip_name }} src -j ACCEPT -iptables -I enemy_input 2 -p udp -m set --match-set {{ whitelist_ports_udp }} dst -m set --match-set {{ whitelist_ip_name }} src -j ACCEPT -iptables -I enemy_input 3 -m set --match-set {{ whitelist_ip_name }} src -j ACCEPT +iptables -I enemy_input 1 -p tcp -m set --match-set {{ whitelist_ports_tcp }} dst -m set --match-set {{ whitelist_ip4_name }} src -j ACCEPT +iptables -I enemy_input 2 -p udp -m set --match-set {{ whitelist_ports_udp }} dst -m set --match-set {{ whitelist_ip4_name }} src -j ACCEPT +iptables -I enemy_input 3 -m set --match-set {{ whitelist_ip4_name }} src -j ACCEPT iptables -I enemy_input 4 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -I enemy_input 5 -p tcp -m set ! --match-set {{ whitelist_ports_tcp }} dst -j DROP iptables -I enemy_input 6 -p udp -m set ! --match-set {{ whitelist_ports_udp }} dst -j DROP