blob: dc393bb86916783e1a04f3b5ab2952f85e0a971d [file] [log] [blame] [raw]
[Unit]
Description=IPv6 Packet Filtering Framework
Before=network.target
Wants=network-pre.target
DefaultDependencies=off
ConditionPathExists=/etc/iptables/ip6tables.rules
[Service]
Type=oneshot
ExecStart=/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
ExecReload=/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
ExecStop=/bin/sh -c "while read table; do ip6tables -t $table --flush; ip6tables -t $table --delete-chain; ip6tables -t $table --list-rules | sed -En 's/^\\-P ([A-Z]+) DROP/\\1/p' | while read chain; do ip6tables -t $table --policy $chain ACCEPT; done; rmmod ip6table_$table; done < /proc/net/ip6_tables_names"
RemainAfterExit=on
[Install]
WantedBy=network.target