Connect with us

VPN

How to set up a VPN on a Raspberry Pi?

Dominik

Published

on

A Raspberry Pi is a microcosm of modern computer tinkering and open source initiatives as this $35 package encapsulates the very best aspects of both, including those relevant to virtual private networks. If you’re wondering how to set up a VPN on a Raspberry Pi – take your pick, because the options are nearly limitless. In fact, you can even set up a Raspberry Pi as a VPN, instead.

Naturally, most major distros compatible with Raspberry Pi hardware support VPN connectivity, so anyone worrying whether their miniature computer will be able to link up with any particular VPN service can rest easy… to a degree.

Why most VPN providers don’t bother with Raspberry Pi

Namely, while there’s little in the way of technologies actively inhibiting Raspberry Pi’s interconnectivity with VPNs, there’s even fewer companies in the industry actively supporting this niche platform. At the end of the day, this is still a $35 computer, so even its average owner probably won’t use it as their primary Internet-browsing device.

Even if they do, this isn’t the type of crowd that struggles with troubleshooting, which is why VPN providers offering official Raspberry Pi support are an extremely rare breed.

They do exist, however, and if your circumstances require you to regularly use a Raspberry Pi to browse the Internet, you should be aware of this market subset led by Pi-friendly NordVPN and pro-Linux-oriented ExpressVPN.

Manual Raspberry Pi VPN setup via OpenVPN

Aka the only way real (wo)men set up VPN connections on Linux – by hand. Show those Windows-using sissies and their automatically updating software how it’s done by launching the Terminal on your Raspberry Pi, refreshing your package list with “sudo apt-get update”, and following up on that with “sudo apt-get install openvpn” in order to unpackage OpenVPN on your $35 machine of destruction.

Next, procure your VPN provider’s OpenVPN configuration files (.ovpn) and download them to your installation directory (cd /etc/openvpn/ by default). From here, you can access individual services by using the “sudo openvpn” in conjunction with the desired filename. E.g. “sudo openvpn my_expressvpn_usa_-_miami_udp”.

Assuming there aren’t any underlying compatibility issues, you’ll be asked to log into your VPN service before your Raspberry Pi establishes an OpenVPN connection.

To undo the rerouting, simply type “sudo killall openvpn” into another terminal window.

Oh, and never, ever use a remote desktop service over an SSH. If none of this is making any sense, we recommend getting PiVPN and following its on-screen instructions to the letter, unless you’re in the mood for a nightmare-inducing troubleshooting headache.


Editor’s Note

How to set up a VPN on a Raspberry Pi?” was written by Dominik Bosnjak, a long-time VPN-user-turned-advocate who spends more time scrutinizing VPN Providers on a daily basis than he’d like to admit. When he isn’t writing VPN Guides and covering general Tech News, he’s probably spending time with his dog, video games, or both. Fun fact: the Shih Tzu in question is the only remaining creature in Dominik’s life who hasn’t told him they’re sick of him talking about Best VPN practices and government-sponsored erosion of digital privacy which made using the Internet less convenient over the years. He occasionally dabbles in video editing, Wall Street memes, and demonstrating a remarkable lack of guitar-playing ability.

If you want more tidbit-sized rants about any of those things, you can find him on Twitter @dddominikk.

Continue Reading