Created
December 28, 2019 19:52
-
-
Save whoamiTM/f8d338a34c5e15e6e2588952da986029 to your computer and use it in GitHub Desktop.
default iptables / ip6tables firewall rules
This file contains 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
# | |
####################################################################### | |
# iptables rules | |
####################################################################### | |
# | |
# Flush current V4 polices | |
iptables -t nat -F | |
iptables -t mangle -F | |
iptables -F | |
iptables -X | |
# Set default chain policies | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT | |
########################## | |
# Save Changes | |
service iptables save | |
# Service | |
service iptables restart | |
####################################################################### | |
# ip6tables rules | |
####################################################################### | |
# | |
# Flush current V4 polices | |
ip6tables -t nat -F | |
ip6tables -t mangle -F | |
ip6tables -F | |
ip6tables -X | |
# Set default chain policies | |
ip6tables -P INPUT ACCEPT | |
ip6tables -P FORWARD ACCEPT | |
ip6tables -P OUTPUT ACCEPT | |
########################## | |
# Save Changes | |
service ip6tables save | |
# Service | |
service ip6tables restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment