On my mac computer at work behind a corporate firewall, I ssh into my home dd-wrt router over the internet, creating a reverse tunnel:

ssh -R 1079:localhost:22 myhomepc.ddns.net

So now, when I'm home, I ssh into my home dd-wrt router, and I can log into my mac at work from the bash prompt on the dd-wrt router

ssh localhost -p 1079

That works. HOWEVER, what I really need is to log into my mac from another computer on my LAN, so I tried:

ssh -p 1079

But this does not work. The question is: How do I expose port 1079 on my dd-wrt router ( so that other computers on my LAN can hit port 1079?

(FYI, here is the output from using telnet to try to hit the port from ubuntu)

root@ubuntu:~# telnet 1079
telnet: Unable to connect to remote host: Connection refused

One way to do this is to set up a local port forward, by sshing into the router and reforwarding port 1079 to something else on localhost. example:

set up forward:

ssh -L 22022:localhost:1079

use forwarded port:

ssh -p 22022

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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