Skip to content

Instantly share code, notes, and snippets.

@develop7
Created January 16, 2012 19:06
Show Gist options
  • Save develop7/1622403 to your computer and use it in GitHub Desktop.
Save develop7/1622403 to your computer and use it in GitHub Desktop.
%  sudo iptables -S > /tmp/before.ipt
%  sudo ufw allow OpenSSH
Rule added
Rule added (v6)
%  sudo iptables -S > /tmp/after.ipt
%  diff -u2 /tmp/before.ipt /tmp/after.ipt
--- /tmp/before.ipt 2012-01-16 22:01:24.675367658 +0300
+++ /tmp/after.ipt 2012-01-16 22:03:40.908253084 +0300
@@ -107,4 +107,5 @@
 -A ufw-user-input -p tcp -m multiport --dports 56882:56889 -j ACCEPT 
 -A ufw-user-input -p udp -m multiport --dports 56882:56889 -j ACCEPT 
+-A ufw-user-input -p tcp -m tcp --dport 22 -m comment --comment "\'dapp_OpenSSH\'" -j ACCEPT 
 -A ufw-user-limit -m limit --limit 3/min -j LOG --log-prefix "[UFW LIMIT BLOCK] " 
 -A ufw-user-limit -j REJECT --reject-with icmp-port-unreachable 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment