OSMC VPN – Setup PPTP & OpenVPN on Raspberry Pi for OSMC

OSMC VPNRaspberry Pi is a platform whose popularity continues growing. While the number of good video centers for Raspberry Pi is limited, users can rely on OSMC or Raspbmc, which is the leading solution. OSMC has gained recognition thanks to the advanced entertainment features that it supports. It is based on Kodi and allows Raspberry Pi users to enjoy a great experience thanks to its stylish interface and vast media library. If you want to get the most out of OSMC and enjoy true freedom to access the content that you want, you will need to get around geographical restrictions. Thankfully, this is possible with the help of a VPN service. Here we will learn how to bypass blocks by setting up a VPN on Raspberry Pi for OSMC so that you can unlock all the possibilities that online entertainment can offer.

Why do you need a VPN for OSMC?

With a VPN, you will be able to bypass the restrictions that prevent you from accessing channels that are subject to geographical blocks. While you may be able to find channels that are available worldwide, there are many options (both free and paid) that are only available in specific locations. If you don’t want to experience limits when you are streaming content online via OSMC, it is important that you use a VPN. This technology will enable you to spoof your location, giving you access to channels that are restricted in your location.

A VPN brings you versatility as you will be able to watch the channel that you want, even if it is not available in your country. Just connect to a VPN server in the location where the content is available and you will be able to trick channels and websites into thinking that you care connecting form that country. This will allow you to access more channels and watch more content. In addition, a VPN encrypts your traffic, which gives you the chance to protect your online activities from eavesdroppers.

Which VPN service should you use?

There are many VPN services available, but we recommend the below options due to their strong security, good service and great speeds that will allow you to stream content without issues.

ExpressVPN – One of the most popular options available due to its impressive speed and high level of security. ExpressVPN has servers in over 90 countries so you will be able to bypass restrictions and watch what you want.

PureVPN – PureVPN is a popular provider that offers affordable plans, easy to use software and over 750 servers in more than 140 countries. This gives you even more freedom to access content from around the world.

NordVPN – NordVPN offers top security and advanced features that allow you to keep your privacy protected. The service also offers fast servers that allow you to defeat restrictions and stream your favorite content. They have servers in over 50 countries.

IPvanish – IPVanish is also recognized for its fast performance and since it manages its own network of servers, it has more control over the security and speed of its service. You can connect to servers in over 60 countries.

How to set up PPTP VPN on OSMC for Raspberry Pi

Once you select the VPN service that you want to use, you can follow the below steps to setup OSMC VPN. Let’s start with the process for PPTP.

1. The first step is to add a PPTP client using this command:

sudo apt-get install pptp-linux

2. Next, create a new file in /etc/ppp/peers and name it. You can choose the bame that you prefer. Then, use these configurations:

pty “pptp $VPNHOSTNAME –nolaunchpppd –debug”
password $PASSWORD
remotename PPTP
maxfail 0

3. Then, run the following command:
sudo pon $FILENAME

4. That is all. Now you will be able to use OSMC Raspberry Pi with a VPN. This allows you to bypass restrictions and access a wider selection of channels and streaming platforms on OSMC, even if they are usually blocked in your location. While PPTP is not the strongest option in terms of security, it allows you to enjoy good speeds.

How to setup OpenVPN on Raspberry Pi

OpenVPN is a safer protocol and it is also possible to use it on Raspberry Pi. Here are the steps required for this process.

1. The first step is to install DNS forwarder on your Raspberry Pi in order to prevent DNS leaks. One of the DNS forwarders that you can use is dnsmasq. To setup DNS forwarder on Raspberry Pi, follow the below process:

Use the commands:
Sudo apt-get install -y dnsmasq



Then, uncomment the settings of “domain-needed” and “bogus-priv” in the following way:

# Don’t forward plain names, meaning that you shouldn’t use dot or the domain part. domain-needed# Don’t forward addresses in the non-routed address spaces.bogus-priv

Now, you need to uncomment settings of “interface” and set it to eth0:

#In order to ensure that dnsmasq listens for DHCP and DNS requests only on# interfaces that have been specified (and the loopback), provide the name of the# interface (such as eth0) here. #The line has to be repeated for more than one interface.interface+eth0

Lastly, save the file with applied changes and restart dnsmasq service:

sudo service dnsmasq restart

2. Now it’s time to setup OpenVPN on Raspberry Pi

sudo apt-get install -y openvpn

Then, you have to download OpenVPN configuration files. You can get these from your VPN provider or https://openvpn.net/index.php/open-source/documentation/howto.html

Once you have downloaded them, extract the files to pi users’ home folder /home/pi/openvpn

Then, copy the Certificate and WDC.key to /etc/openvpn:


Then, create a file /etc/openvpn/auth.txt. This file will be used to store PureVPN login credentials.

sudo nano /etc/openvpn/auth.txt

Save your credentials. These will be provided by the VPN provider that you have. For instance if you use PureVPN, they will look like this:

Username: PureVPN0s123456

Next, make the file read/writable only by root:

sudo chmod 600 /etc/openvpn/auth.txt

Create a file /etc/openvpn/server.conf:

Sudo nano /etc/openvpn/server.conf

Then, set file contents as below:


dev tun

remote ukm1-ovpn.purevpn.net 53

proto udp




tls-auth Wdc.key 1

ca ca.crt

cipher AES-256-CBC


verb 1

mute 20


route-method exe

route-delay 2

auth-user-pass auth.txt

auth-retry interact

explicit-exit-notify 2



The next step is to modify the ownership of OpenVPN configuration file:

sudo chown www-data:www-data /etc/openvpn/server.conf

Then, restart openvpn service and continue:

sudo service openvpn restart

If you want to follow connection process in the logs, open another ssh session and excute this command:

sudo tail -f /var/log/syslog

In case of an error, you will see it in the above log

3. Configure log rotate on Raspberry Pi

Log files take a lot of space on a disk, which has an impact on the system’s performance. This can be fixed by configuring logrotate, to save disk space and improve the performance of the system.

Logrotate is already installed in Raspbian build and you can edit logrotate configuration file:

sudo nano /etc/logrotate.conf

It is possible to rotate frequency to every day ad backlogs to 4, as below:

# see “man logrotate” for details# rotate log files dailydaily# keep 4 days worth of backlogsrotate 4

4. Configure IPTables for Raspbian Firewall

To get the most of an OSMC VPN on Raspberry Pi, the IPTables have to be configured properly. The IPTables are the ones that allow or block a connection as per set rules. In this case, HTTPS and DNS connections have been allowed. The first step is to download VPN Client Gateway project file with this command:

wget here

Extract the downloaded files using the below command:

unzip master.zip

Now execute firewall script and load iptables’ rules. (Find script in folder vpn_client_gateway_master/fw):

sudo ./vpn_client_gw_script.fw

Then, save the rules to make them load automatically at boot time. Use IPtables persistent utility.

Install iptables-persistent:

sudo apt-get install -y iptables-persistent

Once the installation is running, you will be required to store current iptables rules (ipV4 and ipV6). To continue, acknowledge prompts and iptable’s rules.

5. Disable IPV4 and enable IP Forwarding

sudo nano /etc/sysctl.conf

Then, uncomment below-mentioned settings:

net.ipv4.ip_forward = 1

Next, add this code:


The last step is to run this command to activate the chances:

sudo sysctl -p /etc/sysctl.conf

And that is it, you have installed OpenVPN for Raspberry Pi. When OSMC VPN on your Raspberry Pi, you will be able to enjoy an incredible entertainment experience.

How to add channels on OSMC

OSMC stands for Open Source Media Center, while it offers a way to enjoy great entertainment, it should be noted that it doesn’t come with a library of channels pre-installed. This means that you will need to add multiple channels, but this is a very simple process. To access channels on OSMC, you can follow the below simple steps.

  1.  Go to the home screen of OSMC and select Settings, then File manager
  2. Click on Add Source. You will need to enter the path or browse to media location. You can enter this link on the box: http://kodi.metalkettle.co in the box
  3. The next step is to name the specified media source. You can use any name.
  4. Then, return to the home screen and click on Settings
  5. Go to Add-ons and select Install from zip file
  6. Select MK REPO from the list of zip files. Then select Recommended Repositories
  7. Select lambada-1.1.0.zip to install. Once it is installed, you will see an Add-on enabled notification.
  8. Click on Get Add-ons and then select lambda Add-on repository.
  9. Click on Video Add-ons and install Genesis from the list of Video Add-ons.
  10. Return to home screen and click on Videos, then Video Add-ons. There you will find Genesis and you can click on it.
  11. It is also possible to setup a vast list of channels on OSMC by following the above steps. In order to be able to bypass geo-blocks, you need to use a VPN on OSMC. This will also allow you to enjoy high protection for your data.

Why do you always need to use OSMC VPN?

In order to get the most out of OSMC media streaming, a VPN is crucial as it will allow you to enjoy freedom to access the content that you want. You will be able to access unlimited channels easily and will also have the chance to install geo-blocked addons. Plus, a VPN offers strong protection for your data and allows you to keep it private. Last, but not least, a VPN enables you to bypass ISP throttling so that you can enjoy a fast, seamless streaming experience.

Renee Biana

VPN Pick brings you all the latest vpn news, reviews and discounts.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Exclusive Offer: Get a 49% Discount off ExpressVPNGet This Deal