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 &

?האם התשובה שקיבלתם הייתה מועילה

 הדפסת המאמר

קראו גם

ChromeOS L2TP

ChromeOS (L2TP) Step 1: Open Settings  Right-click the time-bar in the bottom right of your...

Linux Ubuntu Network Manger OpenVPN

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

Synology L2TP

Synology DSM 5.2 (L2TP) Step 0: Go to your DSM control panel If you do not know the direct...

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...