A visual guide to SSH tunnels
41–50 of 82 posts
Re: A visual guide to SSH tunnels
#42This[1] is probably the best, easiest and most (visually) effective way to learn about SSH tunnels. [1] : https://unix.stackexchange.com/a/118650/289353
Re: A visual guide to SSH tunnels
#43SSH tunnels are my favorite tool for NAT-busting. I always have to look up the cryptic syntax, but with one strategically placed Raspberry Pi, you can basically get from anywhere to anywhere. And it works just as well on a locked down corporate network as it does on a home network. Why people put up with garbage VPN software is beyond me.
SSH isn’t a replacement for VPNs. I’d argue that they complement each other. For example, SSH port forwarding is TCP only, so if you need UDP, you‘ll need a VPN.
I used to run a site-to-site VPN between two sites a couple of decades ago with a simple script doing just this. These days we'd use OpenVPN or strongSwan for such use-cases but despite the 'hackiness' of the former approach, it worked reliably for years.
Re: A visual guide to SSH tunnels
#44Great write up! One thing to add is that you can even open tunnels during an interactive session without disconnection. To do this, type the escape command sequence ~C (will not show) and it will drop you to the control prompt. You can then add tunnels. ssh> ssh> -L 8000:localhost:9000 Forwarding port.
Re: A visual guide to SSH tunnels
#45Great write up! One thing to add is that you can even open tunnels during an interactive session without disconnection. To do this, type the escape command sequence ~C (will not show) and it will drop you to the control prompt. You can then add tunnels. ssh> ssh> -L 8000:localhost:9000 Forwarding port.
Re: A visual guide to SSH tunnels
#46Drawing some diagrams helped me understand remote port forwarding and OpenSSH's port:host:port syntax: http://dirk-loss.de/ssh-port-forwarding.htm
Re: A visual guide to SSH tunnels
#47Reaching target hosts multiple jump-hosts away, and going the wrong way through multiple firewalls segregating those lans, is another use-case of tunnels I've found handy.
i.e.
your_remote_client_host->internet->fw1->lan1->fw2->lan2->fw3->target_host
Target_host can be reached by doing tunnel-in-tunnel-in-tunnel-in-tunnel. Each tunnel gets you past one firewall. The final tunnel you can just ssh to fw3 via a local tunnel and a local port on your_remote_client now takes you straight to target_host.
Re: A visual guide to SSH tunnels
#48Great write up! One thing to add is that you can even open tunnels during an interactive session without disconnection. To do this, type the escape command sequence ~C (will not show) and it will drop you to the control prompt. You can then add tunnels. ssh> ssh> -L 8000:localhost:9000 Forwarding port.
Is ~ a literal ~ character? Or notation for some modifier key? I only knew about ^ to mean "control".
Re: A visual guide to SSH tunnels
#49This[1] is probably the best, easiest and most (visually) effective way to learn about SSH tunnels. [1] : https://unix.stackexchange.com/a/118650/289353
Re: A visual guide to SSH tunnels
#50Great write up! One thing to add is that you can even open tunnels during an interactive session without disconnection. To do this, type the escape command sequence ~C (will not show) and it will drop you to the control prompt. You can then add tunnels. ssh> ssh> -L 8000:localhost:9000 Forwarding port.
Is ~ a literal ~ character? Or notation for some modifier key? I only knew about ^ to mean "control".