Created
February 17, 2022 06:53
-
-
Save SanjaySRocks/fd0ed9d90544695524c8f8d7dc219a8f 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