Scripts and Guide for setting up OpenVPN with Most VPN,s on Enigma2

I'm getting following error

login as: root
root@vusolose:~# USERNAME='xxxxxxx@gmail.com'
root@vusolose:~# PASSWORD='xxxxxxxxxxxxx
root@vusolose:~# ###############################################################
root@vusolose:~# # Standard Config
root@vusolose:~# # If you change anything below this line, it probably wont
root@vusolose:~# # be able to connect to your VPN.
root@vusolose:~# ################################################################
root@vusolose:~# wget -O Nord.sh https://raw.githubusercontent.com/davesayers2014/OpenVPN/mast
--2018-02-27 15:45:15-- https://raw.githubusercontent.com/davesayers2014/OpenVPN/mast
Resolving raw.githubusercontent.com... failed: Name or service not known.
wget: unable to resolve host address ‘raw.githubusercontent.com’
root@vusolose:~#
root@vusolose:~# login as: root
root@vusolose:~# USERNAME='xxxxxxxxx'
root@vusolose:~# PASSWORD='xxxxxxxxxxxx'
root@vusolose:~# ###############################################################
root@vusolose:~# # Standard Config
root@vusolose:~# # If you change anything below this line, it probably wont
root@vusolose:~# # be able to connect to your VPN.
root@vusolose:~# ################################################################
root@vusolose:~# wget -O Nord.sh https://raw.githubusercontent.com/davesayers2014/OpenVPN/mast
--2018-02-27 15:45:15-- https://raw.githubusercontent.com/davesayers2014/OpenVPN/mast
Resolving raw.githubusercontent.com... failed: Name or service not known.
wget: unable to resolve host address ‘raw.githubusercontent.com’
root@vusolose:~#
root@vusolose:~#
Password:

i ran this following script but getting errors on vpn changer plugin. here is the line I ran. any help appreciated. I'm running openatv 6.2

USERNAME='xxxxxxxxx@gmail.com'
PASSWORD='xxxxxxxxxxxxx'
###############################################################
# Standard Config
# If you change anything below this line, it probably wont
# be able to connect to your VPN.
################################################################
wget --compression=none "https://raw.githubusercontent.com/davesayers2014/OpenVPN/master/NordVPN/Nord.sh" -O- |sed "s/uuuu/$USERNAME/g; s/pppp/$PASSWORD/g; s/GBR/$COUNTRY/g" > script.sh && chmod +x script.sh && ./script.sh
 
i ran this following script but getting errors on vpn changer plugin. here is the line I ran. any help appreciated. I'm running openatv 6.2

USERNAME='xxxxxxxxx@gmail.com'
PASSWORD='xxxxxxxxxxxxx'
###############################################################
# Standard Config
# If you change anything below this line, it probably wont
# be able to connect to your VPN.
################################################################
wget --compression=none "https://raw.githubusercontent.com/davesayers2014/OpenVPN/master/NordVPN/Nord.sh" -O- |sed "s/uuuu/$USERNAME/g; s/pppp/$PASSWORD/g; s/GBR/$COUNTRY/g" > script.sh && chmod +x script.sh && ./script.sh
What errors are you getting on VPN changer? Make sure you're username and password is correct

Sent from my SM-G955F using Tapatalk
 
i ran this following script but getting errors on vpn changer plugin. here is the line I ran. any help appreciated. I'm running openatv 6.2

USERNAME='xxxxxxxxx@gmail.com'
PASSWORD='xxxxxxxxxxxxx'
###############################################################
# Standard Config
# If you change anything below this line, it probably wont
# be able to connect to your VPN.
################################################################
wget --compression=none "https://raw.githubusercontent.com/davesayers2014/OpenVPN/master/NordVPN/Nord.sh" -O- |sed "s/uuuu/$USERNAME/g; s/pppp/$PASSWORD/g; s/GBR/$COUNTRY/g" > script.sh && chmod +x script.sh && ./script.sh

Just noticed you have sed country, COUNTRY only applies for My Private Network try this
Code:
https://www.dropbox.com/s/6kf3vnajs0tslmc/Nord_wget_1.19.3_VPN.txt?dl=1
 
Beta Script

I have been working on a new script this should now give a prompt for users to select what VPN they want to use

It should download the configs for your VPN to HDD/VPN name then you use VPN changer to switch servers, VPN,s added so for:

Nord VPN
IP Vanish
Digibit

My Private Network will stay as a seperate script due to it only using one conf file.

Simply copy this command and past in notepad and edit line one and two

Code:
USERNAME='UUUU'
PASSWORD='PPPP'
###############################################################
# Standard Config
# If you change anything below this line, it probably wont
# be able to connect to your VPN.
################################################################
#!/bin/bash
# Config Example
wget -O VPN.sh https://raw.githubusercontent.com/davesayers2014/OpenVPN/master/Main%20Scripts/VPN.sh && sed -i "s/UUUU/$USERNAME/g" VPN.sh && sed -i "s/PPPP/$PASSWORD/g" VPN.sh && chmod +x VPN.sh && ./VPN.sh

Change UUUU with your username between ' '

Example: 'dsayers'

Change PPPP with your password between ' '

Example: '12ght'

Copy and paste the script in putty and hit enter you should now have the option for what VPN you want to use:

1) Nord VPN
2) IP Vanish
3) Digibit
4) PureVPN
5) Quit


Choose your option and hit Enter this should then download the configs and once finished it will say OpenVPN Configs downloaded Please Start OpenVPN.


You will be asked to enter your choice again but you can ignore this.

Reboot box and goto plugins, VPN Changer and choose a country.

If users would like other VPN,s to be added please PM me the .ovpn files and other files they need and ill look at adding them.

Please note due to the compression wget on OpenATV 6.2 this will likely not work.
 
Last edited:
Guide for setting up OpenVPN with my-private-network on Enigma2



This Guide is for setting up OpenVPN with my private network if done correctly it should download and install your openvpn configs via a simple script


Create an account with my private network -
Code:
https://client.my-private-network.co.uk/aff.php?aff=2640


Please take up on the Free 3-day trial to put the VPN to test


Putty can be downloaded at
Code:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html


If using a Mac there are instructions at the end of the document for an alternative to Putty


First open Putty, and in the HostName (or IP address) box enter the enigma2 boxes IP address, and then click the Telnet radio button and click open
View attachment 28837

And then log in using the word, root


View attachment 28838
clip_image002.png


Download the script from here
Code:
https://www.dropbox.com/s/zfimquxeed9vctx/myvn.txt?dl=1

We only need to edit lines 1 to 3

Change line 1 uuuu with your username between the ""

Example USERNAME='davesayers19'

Change line 2 pppp with your password between the ""

example PASSWORD='149356d'


On line 3 change GBR to the country you want the VPN to connect to

Example COUNTRY='NLD'

NLD is for Netherlands

Do not edit anything below line 3 as it bay cause errors

You can change the country you want the VPN server you want to connect to use the 3 letters 3 Letter Code ie GBR for United Kingdom a list of countries here
Code:
https://help.my-private-network.co.uk/support/solutions/articles/8461-which-countries-can-i-connect-to-


Once you have edited your details copy the script and paste into putty as per example below

View attachment 28839
clip_image004.png


And hit enter

If using OpenATV 6.2 Beta and receive
"script.sh' saved [620/620]
-bash: ./script.sh: can not execute binary file: Exec format error"

This is due to an update in Wget that seems to compress the script please use this script
Code:
https://www.dropbox.com/s/bmu9i612z6eh3ll/wget_1.19.3_VPN.txt?dl=1
and edit details as above and paste in putty.

Before starting OpenVPN we can run an IP check script this will tell you if the vpn is working and you can test it when changing servers.

The script should have downloaded a plugin called IP Checker.

Goto plugin and you should see IP Checker press ok on the plugin and it should run a simple IP check script

You should get something like this I have removed part of my IP address

clip_image006.jpg

View attachment 28840

Now start openvpn on box

clip_image008.jpg

View attachment 28841

After starting openvpn the above should stay green and say running, You can now go back to plugins and start IP Checker and see if the IP Address has changed


If using Mac


There is a version of Putty for Mac but is not very good.


Open Applications ->Utilities ->

Type the following command telnet 192.168.X.X (change the IP address to the one for the Zgemma/Enigma2 boxes)

Enter the username root (and password if you have set one) and press enter

Then follow the instructions above.

Problem 1,

When enabling OpenVPN I lose internet connection.

Possible Solution

Goto your network settings on box and change DHPC to no then blue button to Edit DNS

Try Google DNS

Nameserver 1 8.8.8.8

Nameserver2 8.8.4.4

I have been working on this script since last Friday, I had a few teething problems but thanks to MYVPN with there help we sorted it and also a big thankyou to @grog68 with his suggestions and help with making the script more simpler.

Digibit VPN Guide

https://www.dropbox.com/s/n0tbels6rjn28az/Guide for setting up OpenVPN with Digibit VPN.docx?dl=0

Nord VPN Guide

https://www.dropbox.com/s/a6a0ynz5scjyeg2/Guide for setting up OpenVPN with Nord VPN.docx?dl=0
I'm following the instructions of install on openatv 6.2 beta. but getting error when I launch plugins. screenshot of error attached.
 

Attachments

  • error.jpg
    error.jpg
    1.5 MB · Views: 28
Beta Script

I have been working on a new script this should now give a prompt for users to select what VPN they want to use

It should download the configs for your VPN to HDD/VPN name then you use VPN changer to switch servers, VPN,s added so for:

Nord VPN
IP Vanish
Digibit

My Private Network will stay as a seperate script due to it only using one conf file.

Simply copy this command and past in notepad and edit line one and two

Code:
USERNAME='UUUU'
PASSWORD='PPPP'
###############################################################
# Standard Config
# If you change anything below this line, it probably wont
# be able to connect to your VPN.
################################################################
#!/bin/bash
# Config Example
wget -O VPN.sh https://raw.githubusercontent.com/davesayers2014/OpenVPN/master/Main%20Scripts/VPN.sh && sed -i "s/UUUU/$USERNAME/g" VPN.sh && sed -i "s/PPPP/$PASSWORD/g" VPN.sh && chmod +x VPN.sh && ./VPN.sh

Change UUUU with your username between ' '

Example: 'dsayers'

Change PPPP with your password between ' '

Example: '12ght'

Copy and paste the script in putty and hit enter you should now have the option for what VPN you want to use:

1) Nord VPN
2) IP Vanish
3) Digibit
4) Quit


Choose your option and hit Enter this should then download the configs and once finished it will say OpenVPN Configs downloaded Please Start OpenVPN.


You will be asked to enter your choice again but you can ignore this.

Reboot box and goto plugins, VPN Changer and choose a country.

If users would like other VPN,s to be added please PM me the .ovpn files and other files they need and ill look at adding them.

Please note due to the compression wget on OpenATV 6.2 this will likely not work.
 
Scripts now working with OpenATV 6.2Beta now they've updated wget and removed the stupid compress files. If using OpenATV 6.2 Beta probably best flashing image made after 10/03/2018 although you maybe able to do software updates to update wget.

Also note wilts ATV 6.2 image is still in Beta they could change anything so only use beta if you know your way around your box
 
Last edited:
the script was working a month ago, but getting error on openatv 6.1 and openatv6.2. is their a problem with script now. when i reach end of script get this error.

"Installing VPN Changer

Installing OpenVPN

Downloading OpenVPN Configs

Configuring OpenVPN
./Nord.sh: line 50: syntax error near unexpected token `>'
./Nord.sh: line 50: `cd /hdd/NordVPN &> >/dev/null 2>&1'
Please enter your choice:
root@vuduo2:~#"
 
the script was working a month ago, but getting error on openatv 6.1 and openatv6.2. is their a problem with script now. when i reach end of script get this error.

"Installing VPN Changer

Installing OpenVPN

Downloading OpenVPN Configs

Configuring OpenVPN
./Nord.sh: line 50: syntax error near unexpected token `>'
./Nord.sh: line 50: `cd /hdd/NordVPN &> >/dev/null 2>&1'
Please enter your choice:
root@vuduo2:~#"

Try again ive just made some changes to Nord script
 
Excellent Work :)
Any Chance you can add VPN unlimited to your script?

May I add I am Currently using pure VPN and all working great :)
 
Excellent Work :)
Any Chance you can add VPN unlimited to your script?

May I add I am Currently using pure VPN and all working great :)
If they have a link to all there configs in one zip yes, feel free to pm me it and I'll have a look over the weekend.
 
Back
Top