How To List and Delete Iptables Firewall Rules
iptables -L INPUT -v
Reset Packet Counts and Aggregate Size
iptables -Z
Flush All Rules, Delete All Chains, and Accept All
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
Then flush the nat and mangle tables, flush all chains (-F), and delete all non-default chains (-X):
sudo iptables -t nat -F
sudo iptables -t mangle -F
sudo iptables -F
sudo iptables -X