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

YumRepo Error: All mirror URLs are not using ftp, http[s] or file

Linux: Permanent CIFS/SMB mount

Plesk - Decrypt FTP Passwords