OpenElec

OpenVPN on OpenELEC/KODI

Please note that there is no option in OpenELEC and/or KODI to change the OpenVPN port. The default port is 1194 and this should work fine for most people.
Step 1: Download the required files
To configure OpenVPN on OpenELEC/KODI you need to modify a .ovpn file and use SFTP and SSH.
First download our TLS key and VPN certificate (CA):
Choose a VPN.ht OpenVPN configuration on our servers page (https://vpn.ht/servers) or download our default configuration.
Step 2: Create a authentication file
Create a new text file pass.txt on your dekstop and insert your VPN.ht VPN Username and VPN.ht VPN password. Username in first line and password in second line.
Step 3: Modify the OpenVPN configuration
Open the .ovpn file you downloaded in step 1 and modify the following:
1. Find the lines that say <tls-auth> and </tls-auth>. Remove everything that's in and between these lines so that the complete block is gone.
2. Now add tls-auth /storage/.config/vpnht-tls.key 1 on a new line.
3. Find the line that says auth-user-pass and change it to auth-user-pass /storage/.config/pass.txt
3. Find the lines that say <ca> and </ca>. Remove everything that's in and between these lines so that the complete block is gone.
4. Now add ca /storage/.config/vpnht.crt on a new line.
Step 4: Transfer the files
Start your favourite SFTP client (WinSCP on Windows for example) and transfer the .ovpn files, vpnht.crt, vpnht-tls.key and pass.txt to /storage/.config/ on the OpenELEC/Kodi device.
The default user is 'root' and the default password is 'openelec'.
Step 5: Connect
Now start your favourite SSH client (terminal on Unix, Putty on Windows) and run the following command:
openvpn /storage/.config/your-OpenVPN-filename.ovpn
Wait a few seconds and you should be connected!
You can check your connection by executing:
curl myip.ht/status
Step 6 (Optional): Start at boot
Make sure you're still connected using your favourite SSH client. And execute the following command:
touch /storage/.config/autostart.sh && chmod +x /storage/.config/autostart.sh
Then start nano (or your favourite command line text editor):
nano /storage/.config/autostart.sh
Now make sure the file contains the following (write and save it) and the VPN will connect at startup:
#!/bin/sh

sleep 10s
openvpn /storage/.config/your-OpenVPN-filename.ovpn &

Esta resposta lhe foi útil?

 Imprimir este Artigo

Veja também

Windows L2TP Native VPN

L2TP (native) 1. Start Remote Access Phonebook (RASPHONE) Start the Run command by pressing...

Windows OpenVPN GUI

OpenVPN  This guide is also available as video tutorial: click here to proceed to the video...

ChromeOS OpenVPN

ChromeOS (OpenVPN) Connecting via the OpenVPN protocol is not easy on ChromeOS, since you have...

Asus Router

ASUS Routers Some ASUS routers support connecting to a VPN out-of-the box. So why not connect...

Windows PPTP Native VPN

PPTP (native) Open Control Panel Click on "View network status and tasks" Click on "Setup a...