Skip to content

Instantly share code, notes, and snippets.

@mitchwongho
Last active January 27, 2024 17:06
Show Gist options
  • Save mitchwongho/8edd6fc7c294a881ea47114f87703af5 to your computer and use it in GitHub Desktop.
Save mitchwongho/8edd6fc7c294a881ea47114f87703af5 to your computer and use it in GitHub Desktop.
Setting Up TunnelBear or ExpressVPN (using OpenVPN) On OSMC
# Setting Up ExpressVPN (OpenVPN) On OSMC
## References
- [Brian Hornsby' Kodi OpenVPN plugin](http://brianhornsby.com/blog/how-to-setup-your-vpn-client)
- [Install and Configure OpenVPN on OSMC/Kodi](https://nerddrivel.com/2016/03/25/install-and-configure-openvpn-on-osmckodi/)
- [ExpressVPN - High speed, ultra secure, and easy to use. Instant setup.](https://www.expressvpn.com/)
- [[HOWTO] OSMC/Rasp Pi as OpenVPN client](https://discourse.osmc.tv/t/howto-osmc-rasp-pi-as-openvpn-client/1844/71)
## Steps
- Update repos: `$ sudo apt-get update`
- Install OpenVPN: `$ sudo apt-get install openvpn`
- Reboot: `$ sudo reboot`
- Create VPN config folder `$ sudo mkdir ~/vpn-conf`
- Setup ExpressVPN:
-- Signup for an ExpressVPN account
-- Login to your ExpressVPN account on thier website and click the "Set up ExpressVPN" link (from "My Subscriptions" tab)
-- Click the "Manual Config" option to show the OpenVPN credentials
--- Record the unique client creditials (step 1)
--- Select and download one or more ExpressVPN .ovpn files (step 2)
-- Copy the .ovpn files to `~/vpn-conf` on the OSMC (usually scp to ~/ is allowed)
- Create a .secrets file (e.g express.secrets) in `~/vpn-conf` that contains 2 lines:
-- [Line1]the-unique-expressvpn-username
-- [Line2]the-unique-express-password
- Edit your .ovpn file:
-- Add `dhcp-option DNS 8.8.8.8`
-- Add `dhcp-option DNS 8.8.4.4`
-- Amend `auth-user-pass /home/osmc/vpn-conf/express.secret`
- Import .ovpn configurations into Kodi OpenVPN addon:
-- Navigate to Apps > Program-Addons > OpenVPN
-- Open OpenVPN plugin settings > Import configurations (select the .ovpn to import)
-- Enter a name for the .ovpn configuration & save
-- When connecting to an ExpressVPN server, you'll be prompted for a password.
This password is your ExpressVPN account password.
- Testing your VPN configuration:
-- Test IP: `$ curl http://checkip.dyndns.org`
# Setting Up TunnelBear (OpenVPN) On OSMC
## References
- [Brian Hornsby' Kodi OpenVPN plugin](http://brianhornsby.com/blog/how-to-setup-your-vpn-client)
- [Install and Configure OpenVPN on OSMC/Kodi](https://nerddrivel.com/2016/03/25/install-and-configure-openvpn-on-osmckodi/)
- [TunnelBear Befriends Penguins with Limited Linux Support](https://www.tunnelbear.com/blog/linux_support/)
- [[HOWTO] OSMC/Rasp Pi as OpenVPN client](https://discourse.osmc.tv/t/howto-osmc-rasp-pi-as-openvpn-client/1844/71)
## Steps
- Download TunnelBear OVPN files from [here](https://s3.amazonaws.com/tunnelbear/linux/openvpn.zip)
- SSH into OSMC
- Update repos: `$ sudo apt-get update`
- Install OpenVPN: `$ sudo apt-get install openvpn`
- Reboot: `$ sudo reboot`
- Create VPN config folder `$ sudo mkdir ~/vpn-conf`
- Copy the following TunnelBear OVPN files to `~/vpn-conf` on the OSMC:
-- CACertificate.crt
-- PrivateKey.key
-- UserCertificate.crt
-- TunnelBear[choose_your_region].ovpn
- Create a login key file (login.key) in `~/vpn-conf` that contains 2 lines:
-- [Line1]your-tunnelbear-account-username
-- [Line2]your-tunnelbear-account-password
- Edit your .ovpn file:
-- Change `redirect-gateway` with `redirect-gateway def1`
-- Add `ca /home/osmc/vpn-conf/CACertificate.crt`
-- Add `cert /home/osmc/vpn-conf/UserCertificate.crt`
-- Add `key /home/osmc/vpn-conf/PrivateKey.key`
-- Add `keepalive 10 30`
-- Add `auth-user-pass /home/osmc/vpn-conf/login.key`
- Testing your VPN configuration:
- Start OpenVPN daemon: `$ sudo openvpn /path/to/vpn-conf/<TunnelBear>.ovpn`
- Test IP: `$ curl http://checkip.dyndns.org`
@kaspersoerensen
Copy link

Very nice guide! Installing the openvpn 2.4.0 also solved the problem of using TunnelBear for me.

@CakeTiger
Copy link

Cheers for this guys. I used openvpn_2.4.0-6+deb9u1-bpo8+1 and it worked for TunnelBear.

@harmloh
Copy link

harmloh commented Dec 25, 2017

How to add tunnelbear VPN on wired bro? Hope you can help

@Bagunda
Copy link

Bagunda commented Jan 27, 2024

Где взять файл PrivateKey.key?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment