Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
Created February 1, 2017 14:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxfight3r/a38a13e15a9281111adbc521c282414d to your computer and use it in GitHub Desktop.
Save tuxfight3r/a38a13e15a9281111adbc521c282414d to your computer and use it in GitHub Desktop.
tcp proxy with netcat and socat
#netcat proxy to a different backed and serve requests on port80
mkfifo fifo_pipe
nc -lk -p 80 < fifo_pipe | nc 192.168.1.10 3306 >fifo_pipe
#socat doing the same with connection verbosity
socat -d -d TCP-LISTEN:80,fork TCP:192.168.1.10:3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment