nicholasadamou
9/28/2016 - 8:44 PM

Setting Up TunnelBear (OpenVPN) On OSMC

Setting Up TunnelBear (OpenVPN) On OSMC

# 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`