A Practical Guide to SSH Tunnels: Local and Remote Port Forwarding(labs.iximiuz.com)
357 points by signa11 5 days ago | 66 comments
tl;dr: A hands-on guide to SSH port forwarding covering four modes: local (`-L`) exposes a remote service on a local port, remote (`-R`) exposes a local service on a remote port, and dynamic (`-D` or `-R` without destination) turns either side into a SOCKS proxy for accessing entire networks through one tunnel. Each mode is demonstrated with lab examples using a bastion/jump host setup, and the author offers a mnemonic: `-L local:remote`, `-R remote:local`, with the left side always being the port that opens.
HN Discussion:
  • Sharing creative practical use cases like Docker image transfer and NAT traversal that extend the article's concepts
  • ~Adding complementary SSH features the article omitted, like ~C escape commands and jumphosting (-J)
  • Recommending alternative resources or tools like sshuttle and Cyber Plumber's Handbook for deeper learning
  • Endorsing SSH port forwarding as a powerful pseudo-VPN and privacy tool
  • Snarky remark that this knowledge is just in the manual