Skip to content

Instantly share code, notes, and snippets.

@sq3
Last active Oct 27, 2017
Embed
What would you like to do?
Clear iptables rules
#!/bin/sh
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -t filter -F
iptables -t filter -X
iptables -t filter -Z
iptables -t mangle -F
iptables -t mangle -X
ip6tables -P INPUT ACCEPT
ip6tables -P OUTPUT ACCEPT
ip6tables -P FORWARD ACCEPT
ip6tables -F
ip6tables -X
ip6tables -t nat -F
ip6tables -t nat -X
ip6tables -t nat -Z
ip6tables -t filter -F
ip6tables -t filter -X
ip6tables -t filter -Z
ip6tables -t mangle -F
ip6tables -t mangle -X
ip6tables -t mangle -Z
ip6tables -t mangle -Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment