4 -[ -x /usr/sbin/nft ] && sudo nft flush ruleset
5 sudo ./iptables-workstation.sh
6 sudo sh -c "iptables-save > rules.v4"
7 sudo sh -c "ip6tables-save > rules.v6"
8 -if [ -x /usr/sbin/netfilter-persistent ]; \
10 [ -d /etc/iptables ] && sudo mkdir /etc/iptables; \
11 sudo mv rules.v[46] /etc/iptables; \
12 sudo etckeeper vcs add iptables; \
13 if ! sudo etckeeper vcs diff --staged --no-patch --exit-code -- iptables; \
15 sudo etckeeper vcs commit -m "iptables: update rules" -- iptables; \
17 sudo systemctl restart netfilter-persistent.service; \