Before doing general cleaning iptables make sure you know how to configure it according to your needs
Clear CentOS/ Debian iptables rules .
The following command lines in the following order:
1. iptables -P INPUT ACCEPT 2. iptables -P FORWARD ACCEPT 3. iptables -P OUTPUT ACCEPT 4. iptables -F 5. iptables -X 6. iptables -t nat -F 7. iptables -t nat -X 8. iptables -t mangle -F 9. iptables -t mangle -X
-P (policy) = chain target
-Flush -F [chain] Delete all rules in the chain or all chains
-table table to manipulate (default: `filter ')
-X [chain] Delete and user-defined chain