Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

Some home internet enabled equipment does not implement VPN connectivity which I would like to have. I want to setup one of these devices at a remote location and then have it live as if on my local LAN. The remote location has generic internet access (LAN router). I'm thinking about putting a RaspberryPi in between to smarten up the device's internet connection.

I would like to configure, if possible, the RaspberryPi to accept an incoming connection through ethernet from a device (or several, if using a switch) and then use the wi-fi connection to establish an outgoing internet connection through VPN.

The ethernet connection would control the LAN on that side (assigning IP's and all) The Wi-fi connection would allow traffic to go out once the VPN is established.

Is this possible?

This could be used to have remote devices running as if on the same lan (if at the other end of the VPN I have my LAN).

share|improve this question
    
This is perfectly doable. I suggest reading up on iptables for your firewall/NAT configuration, DHCP and OpenVPN. –  Munkeh Dec 15 '12 at 1:36
add comment

1 Answer 1

Your question is very non-specific. I'm not sure if you're looking for a recipe on how to do this, or a loose guide, or simply whether or not it is possible. With regards to the last, this is certainly possible. A brief outline of what you would need:

  • USB Wifi adapter to connect to your Internet (since Ethernet will serve the devices).
  • OS on the Pi (Arch would probably get you running fastest at the time of this writing).
  • VPN Software package, e.g. IPSEC, PPTP, L2TP, OpenVPN, or other.
  • DHCP & DNS service, e.g. dnsmasq
  • Working knowlege of iproute2

If you're looking more for a recipe on exactly how to do this, that would obviously be a bit more involved, but also perfectly doable. Also worth noting an alternative, if you're in control of the entire network and want all devices to be VPN'd, would be to use a USB Ethernet adapter and put the Pi between your other devices and Internet connection functioning as your main router. There are probably hundreds of ways to do what you're looking for.

share|improve this answer
1  
For the routing and DHCP part, I found this post useful. I used this as a base for connecting the RPi as a router between a LAN and a GSM modem. –  Frepa Dec 14 '12 at 11:16
    
Thank you Kirktis. In the end, I'm looking for a recipe from where to learn from. You've given my a few leads that I will look into but if by chance you could point me to a tutorial, that would make my day. –  greye Dec 15 '12 at 11:39
add comment

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.