Skip to content

Instantly share code, notes, and snippets.

@hplc
Created November 28, 2011 23:15
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 hplc/1402547 to your computer and use it in GitHub Desktop.
Save hplc/1402547 to your computer and use it in GitHub Desktop.
Record TCP port initialization connect and final connect events by iptables
#!/bin/sh
/sbin/iptables -A INPUT -p tcp --syn --dport 5118 -j LOG
/sbin/iptables -A INPUT -p tcp --tcp-flags FIN FIN --dport 5118 -j LOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment