VPN add-on for OSMC

@sam_nazarko This is the result of attempting a tar backup with OpenVPN

osmc@osmc:~$ sudo systemctl stop mediacenter
osmc@osmc:~$ tar -czf kodi-backup.tar.gz .kodi
tar: .kodi/userdata/addon_data/script.openvpn/openvpn.log: Cannot open: Permission denied
tar: .kodi/temp/commoncache.socket: socket ignored
tar: Exiting with failure status due to previous errors

EDIT: Had a look with Filezilla. Obviously seesm to be the openvpn log file. Permission obviously seem to be the issue. Not sure how to change these as I can’t change through Filezilla as I need root permissions to change. Chmod. Have deleted file and doing another .tar backup.

Not sure what kodi/temp/commoncache.socket: socket ignored is.

osmc@osmc:~$ sudo systemctl stop mediacenter
osmc@osmc:~$ tar -czf kodi-backup.tar.gz .kodi
tar: .kodi/temp/commoncache.socket: socket ignored
osmc@osmc:~$

Seems better now after having deleted the openvpn log file. Not sure why it ignores commoncache.socket.

You don’t need to back up the socket file. It will get recreated on first run anyway. Always stop Kodi with the above systemctl command before attempting a backup.

S

Thanks Sam. Yes, I always stop before backing up.

You need to look in “Programs”- “Maintenance”-“IP Address”. You should notice both the i.p address and provider name change.

I think I’m close to getting this set up on rPi2 - I’d appreciated if someone could see below and point me in the right direction…

Following Brian Hornsby’s tutorial, I’ve gone through steps 1-8 - all ok. Problems start at step 9. When I try to access OSMC via ssh on my mac (Terminal), the command is not recognised:

“osmc@osmc-Giggleswick:~$ sudo openvpn /home/osmc/vpn-config/USEast.ovpn
sudo: openvpn: command not found”

I continued anyway with step 10 - installed script (via zip file on a memory stick). In step 11, I go into “usr” >> “sbin” but there is no “openvpn” folder. (Fwiw, per Raspbmc instructions, I’ve gone into ‘script’ and checked the “use sudo when running openvpn” option, and unticked password.)

I went onto step 12 anyway and imported the edited ovpn files. This step has at least partially worked, as, when I go into OpenVPN via Programs menu, a popup screen appears asking me which configuration I want to run. However, when I run any of them, I get an error (“Unable to connect to OpenVPN management interface”).

Further confusing me, when I try to access through FTP (using either the default pi or osmc logins, I get an error:

“Connection attempt failed with “ECONNREFUSED - Connection refused by server”.” (Fwiw, the osmc login is the one that works on ssh).

Can anyone help?

I’m not sure if anybody has answered this already, but what is the Giggleswick, in the above script for?

I think it should read: osmc@osmc:~$ sudo openvpn /home/osmc/vpn-config/USEast.ovpn

The original example script from Brian Horsby was: pi@raspbmc:~$ sudo openvpn /home/pi/vpn-config/USMidwest.ovpn

Hope this helps

Giggleswick is part of the host name. We append a random string so devices are uniquely identifiable on the network. This is prompted in the tutorial

This has worked for a very long time, right until now. It seems to me that something that has been updated stands in the way of this working.

I can’t open the Addon, it simply doesn’t do anything when clicking on it.

Log gives me this:
10:25:52 780813.375000 T:1475343392 NOTICE: Thread JobWorker start, auto delete: true
10:26:36 780857.937500 T:1404040224 NOTICE: Thread LanguageInvoker start, auto delete: false
10:26:36 780858.062500 T:1404040224 NOTICE: -->Python Interpreter Initialized<–
10:26:41 780862.500000 T:1434657824 NOTICE: Thread LanguageInvoker start, auto delete: false
10:26:41 780862.562500 T:1434657824 NOTICE: -->Python Interpreter Initialized<–
10:26:43 780864.750000 T:1483732000 NOTICE: Thread LanguageInvoker start, auto delete: false
10:26:43 780864.812500 T:1483732000 NOTICE: -->Python Interpreter Initialized<–
10:26:46 780868.125000 T:1404040224 NOTICE: Thread LanguageInvoker start, auto delete: false
10:26:46 780868.187500 T:1404040224 NOTICE: -->Python Interpreter Initialized<–
10:26:48 780869.875000 T:1813120032 ERROR: EXCEPTION: Non-Existent Control 300
10:26:51 780872.625000 T:1404040224 NOTICE: Thread LanguageInvoker start, auto delete: false

I was thinking about figuring out a way to only have certain services explicitly allow internet access via OpenVPN only. Like transmission, Flexget.
All other services/apps like Kodi itself can access internet directly (for streams, library scans etc) to have your full internet speed and low latency.

I know it is possible (either by creating a seperate eth0 service or by working with permissions) but I haven’t had time to dive into this. It does seem the world is fast moving towards VPN services to continue downloading certain media so it would make sense to do this per-app.

It would not make that much sense to go through the trouble if you have a paid and fast VPN - which helps you better in keeping safe… my paid vpn does not give me any noticable speed hiccups.

In my case it definitely would. I rarely watch normal TV, I use addons to watch tv broadcasts on demand. They are bound to national viewers only. Just like you can’t watch BBC outside the UK. Using a VPN for all internet traffic generated by OSMC would greatly limit my options to watch streams. There is also no need, only for torrents in my case.

With the app as it was, when it still worked, you could easily switch over to any VPN profile youd like. I used this to watch the BBC content you speak about, and another countrys VPN profile to watch the content limited to that country and soforth.

Can anyone chime in why this does not work anymore? The app does not open…

Strangely enough, after the latest osmc update that was presented in osmc this week, it now works again! Great…

hi just an addition to brian hornsby script is http://forum.kodi.tv/showthread.php?tid=222196 VPNSwitch which switches vpn connection on configured addons

:smiley:

5 posts were split to a new topic: VPN add-on for OSMC - SPLIT

I recently looking the same thing and found a solution which help you too.

First there is no need of any vpn addon for OSMC and you didn’t need it too. Just buy any vpn provider which support PPTP. When you have access the vpn than set OSMC with that vpn provider PPTP. Following is the step by step process which you can follow:

First add a PPTP client by using following command:
sudo apt-get install pptp-linux

Now, you need to create a new file in /etc/ppp/peers and give it a name of your choice. Afterwards follow these configurations:
pty “pptp $VPNHOSTNAME –nolaunchpppd –debug”
name $USERNAME
password $PASSWORD
remotename PPTP
require-mppe-128
require-mschap-v2
refuse-eap
refuse-pap
refuse-chap
refuse-mschap
noauth
debug
persist
maxfail 0
defaultroute
replacedefaultroute
usepeerdns

Finally, run this command:
sudo pon $FILENAME

Doesn’t it confuse yourself that you are talking about a provider supporting openvpn and then you explain how to configure PPTP instead of openvpn?