Exercise 3: Two Ways a Port Forward Becomes a Security Hole — Possible Solution ==================================================================== EXAMPLE 1: A FORGOTTEN OPEN TUNNEL ------------------------------ Per this chapter, "forwarding a sensitive internal service and then forgetting the tunnel is still open" is a real risk. As long as the tunnel remains active, the forwarded service stays reachable through it - if the tunnel is left running long after the diagnostic work is actually finished, it's an unnecessary, unmonitored access path to a sensitive internal service that nobody is actively using or watching, extending the window during which that access could be misused. EXAMPLE 2: BINDING TO 0.0.0.0 INSTEAD OF LOCALHOST ------------------------------ Per this chapter, "explicitly binding a forward to 0.0.0.0 instead of the (usual, safe) localhost-only default - accidentally exposing the forwarded port to your entire local network rather than just your own machine." The default forwarded port is only reachable from the local machine itself; overriding that default to bind more broadly makes the forwarded service reachable by anyone else on the same local network, not just the person who set up the tunnel - turning a personal, single-machine tunnel into something effectively shared with everyone nearby, likely without any of them being an authorized user of the underlying service. WHY BOTH EXAMPLES SHOW THE SAME UNDERLYING RISK ------------------------------ In both cases, the tunnel exists specifically to grant careful, intentional, temporary access to a normally-restricted service - and in both cases, the mistake extends that access beyond its intended scope (in time, for the forgotten tunnel; in reach, for the 0.0.0.0 bind) without anyone deciding that expansion was actually warranted. WHY THIS WORKS AS AN ANSWER ------------------------------ It explains both specific examples the chapter names, and explains the concrete mechanism by which each one expands access beyond what was actually intended, rather than treating either as a vague, unexplained "risk."