VPN add-on for OSMC

Well, i use an FTP connection to put files on my running rpi2… Google it, it’s easy.

You just have to figure out a way to get the zip file on your device and then install it, with effort you will find out how to do this…

Brian has an explanation on how to install from zip: http://brianhornsby.com/kodi_addons/openvpn

I have now figured it out and everything is now working correctly. I used FileZilla to get the Zip file onto my Rasp Pi OSMC.

Thanks to you and everyone else for your help. :relaxed:

It wasn’t installing from Zip that I had a problem with, it was getting the Zip file installed onto my Rasp Pi in the first place.
This has now been achieved and everything is working correctly.

Thanks for your help.

Good to hear you sorted it out.

I have discovered an issue if yuo wish to use the below method to backup your .kodi folder.

Once OpenVPN is installed the backup seems to complete but reports an error with regards to permissions of the openvpn script. Perhaps @sam_nazarko could kindly advise on how to allow the permissions or alter them.

I have a feeling that it is making a backup of the .kodi folder but unable to backup the openvpn part because of the permissions of the script.

I can post back with what putty spits out tomorrow.

How would one check this has worked? Everything seems to have gone fine, but when I check my IP in “System Info”>“Network” it remains the same? I’m using PIA and have followed Brian Hornsbys guide.

Thanks

@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…