Raspberry Pi Remote Site VPN Client Gateway

I need to be able to manage some remote systems to help maintain some remote radio stations. Here's the basic of how to setup your own. This will allow you to connect to computers behind the router without having to setup a static IP address.

This post assumes that you have a reasonable understanding of how to navigate directories, copy, and edit text files from the Linux command line.

Requirements

  • Raspberry Pi (2 B+ or better)
    • Micro SD Card 
    • Power supply
    • Ethernet or Wifi Internet connection
    • Screen with HDMI input
    • Cable from HDMI to screen's input HDMI to VGA, HDMI to DVI, or HDMI to HDMI.
  • VPN Server/Service
We'll assume that you either have an Open VPN server setup or subscribed to an OpenVPN service.

Steps to Setup Raspberry Pi VPN Client Gateway

  1. Create your SD card to run your operating system from. I chose the Raspberian Lite from https://www.raspberrypi.org/downloads/raspbian/
  2. Install the card, connect the peripherals, and power it on.
  3. Login with the user pi and password rasbperry
  4. Run sudo raspi-config
    1. Change your password, Locale, Keyboard, etc....
    2. Run sudo dpkg-reconfigure tzdata to update your timezone.
    3. Turn on SSH
  5. Install software
    1. apt-get install screen openvpn shorewall 
  6. Install your crt and key files in /etc/openvpn/keys
  7. Configure Shorewall

Conclusion

This is a quick and simple way to grant access to other trusted individuals to computers behind a firewall or dynamic IP address. The location of the raspberry pi needs to be secure because if someone were able to obtain access to the Pi they could then compromise the VPN because they would then have access to valid VPN keys. A better solution would be to use a SBC with a built in storage device such as the Udoo x86 or Udoo Bolt.

Affiliate Links

Comments

Popular posts from this blog

Micro LED Light Bars

Wemos D1 Blink

Lab Tools, Supplies & Reviews