Skip to content

Instantly share code, notes, and snippets.

@0x9090
Created September 24, 2017 05:24
Show Gist options
  • Save 0x9090/57bbebd350cce6dcc51253b28894708d to your computer and use it in GitHub Desktop.
Save 0x9090/57bbebd350cce6dcc51253b28894708d to your computer and use it in GitHub Desktop.
iptables example
iptables -P INPUT ACCEPT
iptables -F
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -L -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment