1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

OpenVPN with my-private-network on Enigma2

Discussion in 'IPTV Guides Support and Discussions' started by dsayers2014, Dec 1, 2017.

  1. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    Guide for setting up OpenVPN with Most VPN,s 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:
    [ Only registered users can see the bbcode. Click Here To Register... ]

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


    Putty can be downloaded at
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]

    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
    Screenshot (132).png

    And then log in using the word, root


    Screenshot (133).png
    [​IMG]


    Download the script from here
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    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:
    [ Only registered users can see the bbcode. Click Here To Register... ]

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

    Screenshot (131).png
    [​IMG]

    And hit enter


    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

    [​IMG]
    IP Check sh.jpg

    Now start openvpn on box

    [​IMG]
    OpenVPN.jpg

    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.



    ==================================================================================================================================================================

    New beta OpenVPN script generator


    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

    [​IMG]


    And then log in using the word, root


    [​IMG]

    Users can now visit
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    Add there username and password this will now generate a script.

    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) PIA VPN
    6) Quite


    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.

    Attached is a guide for setting up Digibit, IP Vanish, Pure VPN and Nord
     

    Attached Files:

    Last edited: Sep 1, 2018
    wooshman, Kaiser, bilal96 and 5 others like this.
  2. Damo666

    Damo666 Forum Supporter

    95
    16
    8
    Any chance of a script for Digibit VPN users ?
     
  3. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    Ill have a look but most other VPN,s have separate conf files for each server location so its harder to work out to switch location. My Private Network only uses one config and you can easily use script to edit it.
     
  4. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    For other VPN,s to use VPN Changer

    In the first part I will show you how to rename all .ovpn files to .conf and add auth-user-pass/auth-user-pass password.conf you can skip this part if you have already done this. The second step will show you how to copy all conf files into subfolders with one command and add password.conf to each sub folder.

    Feel free to edit password.conf to user,txt or whatever you prefer.

    On the box create a folder called vpn in hdd

    Now FTP your config files to hdd/vpn

    Now using Talnet/putty type

    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    This will put putty in hdd/vpn

    Now to rename all .ovpn files to .conf

    Type in talnet/putty
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    To add auth-user-pass/auth-user-pass password.conf to each conf file in talnet/putty paste
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]



    Now that is done we can move all configs into subfolders with the same name

    Ensure Talnet is still in hdd/vpn before running this command

    Copy and paste in talnet/putty
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    Now to add password.conf to each sub folder we need to add password.conf to tmp with your username and password added.

    Now use the following command to copy password.conf to each sub folder with this command

    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    Some VPN,s need cert files and other files simply edit the last command to suit

    VPN Changer is pretty simple to use, only issue is with OpenVix pressing red to stop/start OpenVPN just exits the plugin this is due to Key Mapping issue so you will need to goto OpenVPN in network to stop OpenaVPN

    VPN Changer
    http://www.techkings.org/attachments/enigma2-plugin-extensions-vpnchanger_1-1-0_all-zip.31684/

    This should work with most VPN,s
     
    Last edited: Sep 1, 2018
  5. Damo666

    Damo666 Forum Supporter

    95
    16
    8
    Wooshbuild v7 has a digibit von plug in built in. You just enter your digibit user and pass then select server.
     
  6. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    Not everyone uses wooshbuild and I dont think wooshbuild has a build for every enigma2 box
     
  7. Damo666

    Damo666 Forum Supporter

    95
    16
    8
    True. Is there way to extract the plug in ?
     
  8. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    No and only do that if @wooshman says its ok to do so.
     
    wooshman likes this.
  9. thomaskieron

    thomaskieron Registered

    hasn't downloaded the ipchecker plugin
     
  10. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    Running the script?

    Did you reboot box after to see if it shows in plugins?
     
  11. thomaskieron

    thomaskieron Registered

    rebooting now, will let you know in 2 mins
     
  12. thomaskieron

    thomaskieron Registered

    it's still not there
     
  13. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    Somethings not right. Can you try typing in talnet wget -qO- http://ipecho.net/plain;echo

    Take note of the ip address then start OpenVPN then type the ip check again to see if ip address changes.
     
  14. thomaskieron

    thomaskieron Registered

    I get this after hitting return in putty...

    Connecting to raw.githubusercontent.com (151.101.0.133:443)
    script.sh 100% |*******************************| 1833 0:00:00 ETA
    sed: -i requires an argument
    root@zgemmah5:~# script.sh && chmod +x script.sh && ./script.sh
     
  15. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    Just ran it and running fine. check you are only editing line 1 to 3 and copying and pasting the whole script.

    Screenshot (1).png
     
  16. thomaskieron

    thomaskieron Registered

    upload_2017-12-28_22-33-42.png
     
  17. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    So are you changing username and password between ' ' ?
     
  18. thomaskieron

    thomaskieron Registered

    yep, username and password as per the MPN account screen
     
  19. dsayers2014

    dsayers2014 VIP Member

    10,338
    1,475
    133
    Male
    There must be an error how your inputting username and password they need to stay between ' ' example

    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    If you copy and past the above into talnet without editing it still should download and edit the openvpn configs although username and password will be incorrect, then check etc/openvpn user.txt
     
  20. thomaskieron

    thomaskieron Registered

    apart from getting the password wrong, you're spot on!!