From 2146d4ef1454503ff27c7ee450683d20bcb19831 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 19 Nov 2026 02:52:24 +0100 Subject: [PATCH] INSTALL: start firewall units after network-online.target and nss-lookup.target. Rules may contain hostnames (e.g. in allow_local_net_to_ext_service), which iptables resolves when the rule is created. With only After=network.target, name resolution may not be available at boot and those rules are silently missing (seen on gw-ah and gw-km). Co-Authored-By: Claude Opus 5.5 --- INSTALL | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/INSTALL b/INSTALL index cf3183e..879ec33 100644 --- a/INSTALL +++ b/INSTALL @@ -59,7 +59,11 @@ cp /usr/local/src/ipt-gateway/conf/main_ipv6.conf.sample /etc/ipt-firewall/main_ cat < /etc/systemd/system/ipt-firewall.service [Unit] Description=IPv4 Firewall with iptables -After=network.target +# - Start after network AND name resolution are available: rules may contain +# - hostnames (e.g. in allow_local_net_to_ext_service), which are resolved by +# - iptables when the rule is created. +Wants=network-online.target +After=network-online.target nss-lookup.target [Service] SyslogIdentifier="ipt-gateway" @@ -78,7 +82,11 @@ EOF cat < /etc/systemd/system/ip6t-firewall.service [Unit] Description=IPv6 Firewall with ip6tables -After=network.target +# - Start after network AND name resolution are available: rules may contain +# - hostnames (e.g. in allow_local_net_to_ext_service), which are resolved by +# - iptables when the rule is created. +Wants=network-online.target +After=network-online.target nss-lookup.target [Service] SyslogIdentifier="ip6t-gateway"