Created
March 10, 2024 13:50
-
-
Save selivan/ea8b486fd25474e41b83410744072cac to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Accept all traffic first to avoid ssh lockdown via iptables firewall rules # | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT | |
# Flush All Iptables Chains/Firewall rules # | |
iptables -F | |
# Delete all Iptables Chains # | |
iptables -X | |
# Flush all counters too # | |
iptables -Z | |
# Flush and delete all nat and mangle # | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -t raw -F | |
iptables -t raw -X |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment