Skip to content

Instantly share code, notes, and snippets.

@SanjaySRocks
Created February 17, 2022 06:53
Show Gist options
  • Save SanjaySRocks/fd0ed9d90544695524c8f8d7dc219a8f to your computer and use it in GitHub Desktop.
Save SanjaySRocks/fd0ed9d90544695524c8f8d7dc219a8f to your computer and use it in GitHub Desktop.
Remove all default firewall rules in oracle cloud permanently
# 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