avizzv92
Posts: 5
Joined: Sat Jun 30, 2012 3:14 am

VPN alternative for accessing home network abroad.

Tue Oct 23, 2012 10:58 pm

I'm going to be traveling abroad for a extended period starting at the beginning of next year. I would like to be able to access certain video streaming sites and news sites without the hindrance of country restrictions.

A logical option would be to use my Raspberry Pi as a simple VPN server to access my home network abroad. I managed to get PPTP setup on my Pi and was able to connect to it with the LAN ip, but my router seems to have problems allowing outside access to the VPN server. I researched the proper port-forwarding and router setup but had little luck; It seems people have mixed luck with my router supporting VPN (Netgear WGR614v9).

I'm not extremely knowledgeable when it comes to networking and servers. But, are there alternative ways to use my Raspberry Pi to access my network abroad, for the purposes of surfing the web?

I would need to be able to connect to it with Mac OS X. iOS would be a nice bonus, but not essential.

UPDATE: I can get the VPN working if I set up a DMZ that points to my Raspberry Pi. I realize this posses a security concern; but is there any real danger in my case? There isn't anything confidential or important on my Raspberry Pi.

User avatar
jecxjo
Posts: 158
Joined: Sat May 19, 2012 5:22 pm
Location: Minneapolis, MN (USA)

Re: VPN alternative for accessing home network abroad.

Wed Oct 24, 2012 3:42 am

A simpler solution would be to enable an ssh server on your Pi (which may already be enabled.) Most ssh servers allow for port forwarding, which would allow you to get access to your home network and it's internet connection. Using port forwarding you can setup a Socks Proxy and have your web browser redirect all your traffic over ssh to your home where it would then be sent out onto the internet.

Check your Server Config
First step is to check if your server has port forwarding enabled. Edit /etc/ssh/sshd_config (or the sshd config file for your distro) and make sure the following lines are enabled.

Code: Select all

AllowTcpForwarding yes
Restart your server and you should be good to go. Also make sure to setup your home router to enable port 22 to be forward to your Pi. Find appropriate document for your brand of router.

Client....engage port forwarding
The next step is to ssh into your Pi with port forwarding enabled. If you are on Linux or Mac (just making this a general response even though you said OS X ) you can enable forwarding with one simple flag.

Code: Select all

ssh -D 8080 mypi.com
Once you log in your computer now has a local Socks Proxy running on port 8080. Reconfigure your web browser to use a Socks Proxy with IP: 127.0.0.1 and Port: 8080 and away you go.

If you are running a Windows machine PuTTY has the ability to enable port forwarding...almost as simple. When you start PuTTY before you conenct go to Connection > SSH > Tunnel. Enter 8080 into the Source Port and select Dynamic for the type and then click Add. Connect to your Pi and setup the browser for Socks on 8080.
xmpp: [email protected]
Blog: http://jecxjo.motd.org/code

Return to “Networking and servers”