#!/bin/sh iptables-save -c > /etc/iptables/rules.v4 if [ -f /etc/iptables/rules.v4 ]; then iptables-restore < /etc/iptables/rules.v4 fi ip6tables-save -c > /etc/iptables/rules.v6 if [ -f /etc/iptables/rules.v6 ]; then ip6tables-restore < /etc/iptables/rules.v6 fi exit 0