Skip to content

Instantly share code, notes, and snippets.

@tsukanov-as
Forked from tuxfight3r/nc_tricks.sh
Created November 30, 2024 17:25
Show Gist options
  • Save tsukanov-as/f28c7ffd9b2252632b57a1385f84a57e to your computer and use it in GitHub Desktop.
Save tsukanov-as/f28c7ffd9b2252632b57a1385f84a57e 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