iptables-save > /etc/iptables/rules.v4
ip6tables-save > /etc/iptables/rules.v6
Regeln laden:
iptables-restore < /etc/iptables/rules.v4
ip6tables-restore < /etc/iptables/rules.v6
Regeln bei Neustart automatisch einspielen:
#!/bin/bash
iptables-restore < /etc/iptables/rules.v4
ip6tables-restore < /etc/iptables/rules.v6