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.

In preparation for a lengthy business trip, I set up my router such that I can access my home computer over the internet via port forwarding over SSH. One thing I neglected to do was setup access to my router remotely. Normally, I can just access the router configuration page via 192.168.1.1.

I know that it's possible to tunnel traffic through SSH, but how do I access an IP address as if I were on my home network using SSH?

share|improve this question

closed as off topic by EEAA, Wesley, womble, Ward, mgorven Jul 9 '12 at 4:53

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 2 down vote accepted

If you're already away from home and didn't enable the port mapping to the SSH port, you may not have any recourse.

If you do have SSH access to your system, you can establish an SSH tunnel through your exposed host to access some local resources.

For example, if your router's configuration page is: 192.168.1.1 and you're connecting from a Unix-like host (you didn't specify the operating systems involved):

sudo ssh -L 80:192.168.1.1:80 username@external_IP

Where external_IP is the internet-facing IP address of your home computer/router and username is the user name on that system. If the connection is successful, you'll be able to point your mobile system to http://127.0.0.1 to access the router page.

share|improve this answer

Just use ssh port forwards. If 1.2.3.4 is the p of your router, then:

$ ssh user@1.2.3.4 -L8888:192.168.1.1:80

After connecting, enter http://localhost:8888 in your browser, and you should see your router's login page.

share|improve this answer

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