+## Allow stuff through unknown tables.
+for ip in ip ip6; do
+ for table in $(cat /proc/net/${ip}_tables_names); do
+ case $table in mangle | filter) continue ;; esac
+ ${ip}tables -nL -t $table |
+ sed -n '/^Chain \([^ ]\+\) (policy .*$/ s//\1/p ' |
+ while read chain; do
+ run ${ip}tables -t $table -P $chain ACCEPT
+ done
+ done
+done
+
+## Dump the resulting configuration.
+if [ "$FW_DEBUG" ]; then
+ for ip in ip ip6; do
+ for table in mangle filter; do
+ echo "----- $ip $table -----"
+ echo
+ ${ip}tables -t $table -nvL
+ echo
+ done
+ done
+fi
+