Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I create a remote port forwarding tunnel with Putty, a remote port opens on interface with ip 127.0.0.1. On the remote host I'm able to nc localhost RPORT and forwarding works, but I'm unable to connect with nc RHOST RPORT. The problem is, that RPORT gets open on wrong interface -- localhost, instead of the public IP interface.

How can I setup remote port forwarding, so that I can connect from the internet, to RHOST:RPORT?

On RHOST, netstat -an | grep RPORT returns tcp 0 0 127.0.0.1:RPORT 0.0.0.0:* LISTEN

share|improve this question
    
@DmitriChubarov: I think you are confusing local forwarding with remote forwarding. Setup on your image would forward local port 3128 to a remote port proxy:3128. My problem is with remote -> local. –  qwe Nov 8 '12 at 18:23

1 Answer 1

GatewayPorts needs to be set to on in sshd_config for the far side to allow others to connect to the forwarded port or you need to check 'Remote ports do the same (SSH-2 only)' in the PuTTY GUI to request that setting of the session.

If you wanted to forward from other hosts via PuTTY you need to check the 'Local ports accept connections from other hosts' setting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.