Skip to content

Instantly share code, notes, and snippets.

@JayCuthrell
Created August 20, 2010 07:39
Show Gist options
  • Save JayCuthrell/539833 to your computer and use it in GitHub Desktop.
Save JayCuthrell/539833 to your computer and use it in GitHub Desktop.
[tom]$ sudo yum install socat
[tom]$ sudo /sbin/iptables -L -n
[tom]$ socat -u TCP4-LISTEN:6000,reuseaddr,fork OPEN:/tmp/captureport6000.txt,creat,append
(open another terminal on a remote host)
[jerry]$ telnet tom 6000
Trying 192.168.1.202...
Connected to tom.
Escape character is '^]'.
Hello world.
^]
telnet> quit
Connection closed.
(now let's check our capture)
[tom]$ cat /tmp/captureport6000.txt
Hello world.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment