Pi-Powered VPN Client Gateway with Web based Management Interface

Most VPN service providers offer several servers to connect to around the world. When I first started using a VPN, I configured OpenVPN on my main home network router. To change which VPN server I was connecting to, I’d edit the OpenVPN server setting on the router admin page and restart the service. To simplify the process of switching servers, I developed a set of web pages and scripts to allow me to change the VPN server just by opening a web page and clicking on a country flag. This solution worked well, but as it was implemented using optware packages on a router running Tomato firmware, it wasn’t a very portable solution; anyone who wanted this functionality would have to purchase a router that supports open source firmware. After a recent router upgrade I decided to port the solution to the Raspberry Pi which offers a much better development environment and much lower cost than a router. The new version is easy to set up and has an improved user interface; I can set it up for friends and family who may not have much technical knowledge.

Here’s a screenshot of the management web page:

screenshot5

To change VPN servers, just click on a flag.

The list of VPN servers shown is generated dynamically, so you can modify the source XML file to tailor which servers are shown without having to modify the HTML page.

This implementation was built using the Private Internet Access OpenVPN service. It could potentially be modified to work with other OpenVPN service providers.

I have written an installation guide and uploaded it (along with the related files) to a github repository so that you can download it and build your own VPN client gateway. You can get the files from the github repository; click on the “Download Zip” button on the github page:

https://github.com/mr-canoehead/vpn_client_gateway

Advertisements

4 thoughts on “Pi-Powered VPN Client Gateway with Web based Management Interface

  1. Hi,
    great project!

    Would it be possible to add a button to turn off the vpn? So that the devices connected to it would just use the “normal” internet-connection?

    I live in Germany and would like to use your project for my Chromecast. Unfortunatly my Internet-speed is pretty poor. Therefore it would be great to not use any vpn when using german-video-streams or similar..

    thanks!

    Like

  2. Hi Kev,
    This is a good feature to add to the project. I have some ideas on how to implement it, but I’ll need some time to code and test the change before committing it to the repository so please be patient!

    Keep an eye on the project github page for updates.

    Thanks,
    Chris

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s