Basic socks proxy to a server
This will expose a socks proxy on your computer on port
1080
.
ssh -ND 1080 example.com
The way I use them is to tunnel my web browser traffic.
In Firefox this can quickly be done by going to settings > network settings (at the bottom) > manual proxy
Address: 127.0.0.1
Port: 1080
Now when you visit a site you’re traffic is routed through the proxy!
Jumping through a server
Say you’ve got a host that is either protected by a firewall or behind NAT. Just jump through it!
ssh -J gateway.example.com host.example.com