I am using the following script to clear all iptables rules. I use the script when I am debugging my iptables rules.
#!/bin/bash /sbin/iptables -P INPUT ACCEPT /sbin/iptables -P OUTPUT ACCEPT /sbin/iptables -P FORWARD ACCEPT /sbin/iptables -F /sbin/iptables -X for table in filter nat mangle; do /sbin/iptables -t $table -F /sbin/iptables -t $table -X /sbin/iptables -t $table -Z done