3 # Usage: iptables-flush [6]
7 if ! type -p "$iptables" &>/dev
/null
; then
8 echo "error: invalid argument"
12 while read -r table
; do
13 tables
+=("/usr/share/iptables/empty-$table.rules")
14 done < <(nft list tables |
sed -n "s/table ip$1 //p")
16 if (( ${#tables[*]} )); then
17 cat "${tables[@]}" |
"$iptables-restore"