![]() |
|
|
#1 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
2×53×71 Posts |
When out of town, is it possible to have my laptop connect to and route my Internet traffic through my home LAN?
Why do this? When out of town, I'd like to send instructions to the PrimeNet server which is firewalled so that only my home static IP can get in. I'd also like to telnet/VNC to the machines on my home LAN. My home setup is a DSL modem supporting a static IP. That is connected to a router. My machines connect to the router. |
|
|
|
|
|
#2 |
|
"Sander"
Oct 2002
52.345322,5.52471
29×41 Posts |
I see two possible options.
1) Setup a VPN. For example with http://openvpn.net/ 2) Access the console of a pc/server at home. I have good experience with http://www.teamviewer.com |
|
|
|
|
|
#3 | |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
141518 Posts |
Quote:
As an example, say you have a box with local IP address 10.0.0.1 running an SSH server which is port-forwarded to be accessible from the internet. You want to VNC into 10.0.0.2, which is not port-forwarded in any way, from your laptop, which is connected to the Internet in another location. To do this, you'd run the following command from the laptop (assuming you have an SSH client installed--it's present in most Linux distributions by default, but is also available for Windows): ssh user@your-home-static-ip -L 1234:10.0.0.2:5900 SSH will prompt for the given user's login password on 10.0.0.1. Once you've entered that, you will be given a terminal shell on 10.0.0.1, which may or may not be of direct use to you. However, more importantly, the SSH client on the laptop has now started up a server on localhost (the laptop) port 1234, which is securely "tunneled" through the SSH session such that the server (10.0.0.1) will forward any packets received through the tunnel to 10.0.0.2 port 5900. The upshot is that you can open a VNC client on the laptop, connect to localhost port 1234, and it works as if you were on 10.0.0.1's console and VNCing to 10.0.0.2 port 5900. I've used this method myself and found it to be very powerful--essentially, you are opening a little one-port pipe to the SSH server through which you can connect to anything the server can connect to. You can use one internet-accessible machine as a "jumping-off point" by which to securely access any machine on your local network, thus allowing you remote access to all of your machines without having to actually expose each machine to the Internet and all its dangers. SSH also includes another option, a sort of "dynamic tunneling", which can be used to tunnel web access through the server: ssh user@your-home-static-ip -D 8080 which will run a SOCKS proxy server on the laptop's port 8080 such that if you configure the laptop's browser to use localhost:8080 as a proxy, all of its connections will be encrypted and relayed through the server. You can thus browse with the same level of security you'd enjoy at home, even if your internet access point is through (say) an insecure public hotspot. And since you are browsing vicariously through the server, you can access web servers on your local private network as well (if such would be useful). I do believe there is also an option -R which is supposed to be the inverse of -L (run a server on port 1234 on the SSH server, i.e. 10.0.0.1 in this example, which can be used to poke through and access a server and port through the laptop), though I haven't actually tried that one myself. Hope this helps!
|
|
|
|
|
|
|
#4 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
2·53·71 Posts |
Excellent leads on how to proceed. Thanks.
Right now I'm stuck getting my DSL modem and DLink router to forward port 22. Three hours and no luck. Any help would be appreciated. Attached is a screen shot of my feeble attempt. Four more follow as forum won't attach more than one per post. (later merged per suggestion) Last fiddled with by Prime95 on 2011-05-05 at 14:09 |
|
|
|
|
|
#5 | |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
186916 Posts |
Quote:
BTW, regarding attaching files to forum posts, I've discovered a little trick that lets you attach as many files as you want to one post (as long as they each individually are within the size limits): attach them to separate posts, then use the "Merge Posts" feature to combine them into one. This only works if you have mod status in the applicable subforum, but in your case that wouldn't be a problem.
|
|
|
|
|
|
|
#6 | |
|
I quite division it
"Chris"
Feb 2005
England
207710 Posts |
Quote:
|
|
|
|
|
|
|
#7 | |
|
P90 years forever!
Aug 2002
Yeehaw, FL
165468 Posts |
Quote:
How I ended up with this dual-NAT configuration is lost in antiquity. It might be possible to simplify things, but I'd lose at least 2 "features". 1) I like IP addresses that don't change. The router has a DHCP option that hands out the specific IP addresses to specific MAC addresses - the DSL modem does not have this feature. 2) Dual-NAT gives some minuscule security benefit in that if the bad guys pierce the DSL modem firewall they have to get through the router firewall too (that dual firewall is so good even I can't get through to do port forwarding!). I'll try more banging my head against the wall tonight. |
|
|
|
|
|
|
#8 |
|
Aug 2002
North San Diego County
5×137 Posts |
A long time ago (1996-8) I encountered a router that simply would not route if both WAN and LAN had 192.168.x.x addresses. Had to change LAN to 10.x.x.x
|
|
|
|
|
|
#9 | |
|
Dec 2009
Peine, Germany
331 Posts |
Quote:
). Thanks for all your work!
|
|
|
|
|
|
|
#10 | |
|
P90 years forever!
Aug 2002
Yeehaw, FL
11101011001102 Posts |
Quote:
Much time wasted on that little gotcha! |
|
|
|
|
|
|
#11 | |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
37·263 Posts |
Quote:
Such remote access only makes sense when done remotely.... |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Networking issues with Haswell-based Linux increase Courvoisier consumption | ewmayer | Linux | 47 | 2013-07-11 07:25 |