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 <noreply@anthropic.com>
This commit is contained in:
1 parent
669a44bab1
commit
2146d4ef14
1 file changed
+10
-2
@@ -59,7 +59,11 @@ cp /usr/local/src/ipt-gateway/conf/main_ipv6.conf.sample /etc/ipt-firewall/main_
|
|||||||
cat <<EOF > /etc/systemd/system/ipt-firewall.service
|
cat <<EOF > /etc/systemd/system/ipt-firewall.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=IPv4 Firewall with iptables
|
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]
|
[Service]
|
||||||
SyslogIdentifier="ipt-gateway"
|
SyslogIdentifier="ipt-gateway"
|
||||||
@@ -78,7 +82,11 @@ EOF
|
|||||||
cat <<EOF > /etc/systemd/system/ip6t-firewall.service
|
cat <<EOF > /etc/systemd/system/ip6t-firewall.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=IPv6 Firewall with ip6tables
|
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]
|
[Service]
|
||||||
SyslogIdentifier="ip6t-gateway"
|
SyslogIdentifier="ip6t-gateway"
|
||||||
|
|||||||
Reference in new issue
Block a user