Skip to content

Instantly share code, notes, and snippets.

@ahmed-abdelazim
Created June 3, 2020 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmed-abdelazim/04c3fee9980a17bbc6b77d4abcd1c419 to your computer and use it in GitHub Desktop.
Save ahmed-abdelazim/04c3fee9980a17bbc6b77d4abcd1c419 to your computer and use it in GitHub Desktop.
iptables fix after flush
#!/bin/sh
IPT="/sbin/iptables"
# Set default policies for all three default chains
$IPT -P INPUT ACCEPT
$IPT -P FORWARD ACCEPT
$IPT -P OUTPUT ACCEPT
# Flush old rules, old custom tables
$IPT --flush
$IPT --delete-chain
$IPT -t nat --flush
$IPT -t mangle --flush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment