-
-
Save karolsteve/b2a1256fdcfd496c48f39dfa717b49b7 to your computer and use it in GitHub Desktop.
Remove all default firewall rules in oracle cloud permanently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Take backup of iptables | |
cp /etc/iptables/rules.v4 /etc/iptables/rules.v4.backup | |
cp /etc/iptables/rules.v6 /etc/iptables/rules.v6.backup | |
# Flush rules | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT | |
# Save changes | |
iptables-save > /etc/iptables/rules.v4 | |
ip6tables-save > /etc/iptables/rules.v6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment