Skip to content

Instantly share code, notes, and snippets.

@j33ty
Created December 26, 2019 08:23
Show Gist options
  • Save j33ty/16f1b6cee2d4ab5ccf4170a4c1351364 to your computer and use it in GitHub Desktop.
Save j33ty/16f1b6cee2d4ab5ccf4170a4c1351364 to your computer and use it in GitHub Desktop.
SSH Tunneling
# Local port forwarding
# Forward all the requests on localhost:8000 to restricted-domain.com:80 via remote-server.com
ssh -L 8000:restricted-domain.com:80 user@remote-server.com
# Remote port forwarding
# Forward all requests to remote-server.com:8000 to your localhost:3000
ssh -R 8000:localhost:3000 user@remote-server.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment