Skip to content

Instantly share code, notes, and snippets.

@Alex4386
Created July 22, 2019 12:54
Show Gist options
  • Save Alex4386/b64fd29be49dc1c768af58ea86edf0fa to your computer and use it in GitHub Desktop.
Save Alex4386/b64fd29be49dc1c768af58ea86edf0fa to your computer and use it in GitHub Desktop.
SSH PortForwarding

SSH Port Forwarding

I can't understand anything!

Listen to this guide by gigafide: https://www.youtube.com/watch?v=AtuAdk4MwWw

Local Port Forwarding

ssh -L 2100:nas.alex4386:21 intranet.alex4386.us

What this command do?
this will connect intranet.alex4386.us in ssh,
ssh will forward nas.alex4386's port 21 (from intranet.alex4386.us's network) to your localhost port 2100.

Dynamic Port Forwarding

ssh -D 9090 intranet.alex4386.us

Opens SOCKS5 Proxy at localhost:9090

Reverse Port Forwarding

ssh -R 2200:localhost:22 public.alex4386.us

This will tunnel localhost:22 to public.alex4386.us:2200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment