Explain SSH local, remote and dynamic port forwarding.
AdvancedConceptNetworking, SSH & Scheduling
Answer
# Local: localhost:5433 -> (via bastion) -> db.internal:5432
ssh -N -L 5433:db.internal:5432 bastion
# Remote: expose my local :3000 as :8080 on the server
ssh -N -R 8080:localhost:3000 server
# Dynamic: SOCKS5 proxy on localhost:1080
ssh -N -D 1080 bastion
-N means no remote command. Remote forwards bind only to loopback unless GatewayPorts is enabled on the server.
More on Networking, SSH & Scheduling
Which `ip` commands replace ifconfig, route and arp?BeginnerWhat does `ss` show, and which flags do you use?BeginnerExplain the TCP connection states you see in ss.AdvancedWhat happens, step by step, when you run `curl https://example.com`?AdvancedWhich curl flags are most useful for debugging?BeginnerHow do you use `dig` for DNS troubleshooting?Beginner