Skip to content

Instantly share code, notes, and snippets.

View m1tk4's full-sized avatar

Dimitri Tarassenko m1tk4

View GitHub Profile
@m1tk4
m1tk4 / nc-proxy-readme.md
Last active August 9, 2024 13:17 — forked from ivan-loh/README.md
netcat tcp proxy, for mapping ports on a remote machine to a local machine

Helper script to map ports to other servers.

Use Case

had a database that was only accesible in the VPC on aws, so i created an dev intance and did a ssh tunnel to that dev instance with netcat mapping the port to the database

Sample Usage

Forward all request from local 5432 to remote host google.com port 80

./nc-proxy.sh 5432 google.com 80