IPTables: Clear all rules

When you need to clear all rules and set the default police to ACCEPT.

iptables-save | sed "/-/d;/^#/d;s/DROP/ACCEPT/" | iptables-restore

This is not permanent. The default rules will be reloaded if IPTables, your firewall or the server is restarted.

Comments

Popular posts from this blog

Linux: Permanent CIFS/SMB mount

Google Chrome: Manage Flash Sites

Plesk - Decrypt FTP Passwords