Skip to content

Instantly share code, notes, and snippets.

@meeuw
Created May 23, 2014 19:18
Show Gist options
  • Save meeuw/14f27a710045872c21f9 to your computer and use it in GitHub Desktop.
Save meeuw/14f27a710045872c21f9 to your computer and use it in GitHub Desktop.
dynamic port forwards with openssh using the build-in socks proxy. for example: ssh remotehost -D 1080 & socksl.sh 1080 5901 127.0.0.1 5900 # acts like ssh -L 5901:127.0.0.1:5900 remotehost
socat TCP4-LISTEN:$2,reuseaddr,fork,bind=0.0.0.0 SOCKS:localhost:$3:$4,socksport=$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment