PuTTY SSH reverse tunnel
There are two checkboxes when setting up the PuTTY tunnel,
- Local ports accept connections from other hosts
- Remote ports do the same (SSH-2 only)
the second of those does what you need.
I just tested it,
PuTTY tunnels dialog,
- Tick Remote ports ...
- Put 8080 into Source port
- Put 127.0.0.1:80 into Destination port
- Select 'Remote' radio button
- Click Add
- Connect
Works fine, here's the resulting netstat,
# netstat -an | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN tcp6 0 0 :::8080 :::* LISTEN You can also use plink.exe that comes with PuTTY, for example,
which works fine as well.
# netstat -an | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN tcp6 0 0 :::8080 :::* LISTEN If you're still getting 127.0.0.1:8080 on the host, then GatewayPorts is still set to no in your sshd config.