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

I have my router connected to the Internet. From the router, I have an ssh tunnel setup like this:

ssh -f tunnelserver.net -L 2000:proxy:8888 -N

This opens the port 2000 on localhost from my router. Now I want this port to be accessible from within my LAN, but it is closed. How can I open it?

I have GatewayPorts yes in /etc/ssh/sshd_config, if that matters.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You need to specify the interface that ssh should listen to. Something like:

ssh -f tunnelserver.net -L 192.168.1.1:2000:proxy:8888 -N

or change 192.168.1.1 with the IP assigned on your router's LAN interface.

share|improve this answer
    
That's brilliant! Thanks alot! –  Johan Sep 11 '11 at 10:20

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.