Skip to content

Instantly share code, notes, and snippets.

@Thermi
Last active February 28, 2019 22:13
Show Gist options
  • Save Thermi/e01ef209652305dba1e5a60aee84499c to your computer and use it in GitHub Desktop.
Save Thermi/e01ef209652305dba1e5a60aee84499c to your computer and use it in GitHub Desktop.
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp --icmp-type echo-request -j ACCEPT
-A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
-A INPUT -s 87.128.0.0/10 -p tcp --dport 22 -m limit --limit 10/min -j LOG --log-prefix "SSH_TRAFFIC "
-A INPUT -s 87.128.0.0/10 -p tcp --dport 22 -j ACCEPT
-A INPUT -p tcp --dport 80 -m limit --limit 10/min -j LOG --log-prefix "HTTP_TRAFFIC "
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -m limit --limit 10/min -j LOG --log-prefix "HTTPS_TRAFFIC "
-A INPUT -p tcp --dport 443 -j ACCEPT
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment