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 TK Veteran

    9,536
    1,124
    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:
    [ 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.



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

    Attached Files:

    Last edited: Mar 18, 2018
    Kaiser, bilal96, joe516 and 4 others like this.
  2. Damo666

    Damo666 Forum Supporter

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

    dsayers2014 TK Veteran

    9,536
    1,124
    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 TK Veteran

    9,536
    1,124
    So I have been playing with this today and have it half working. I downloaded the configs Digibit gave me, then unzip,t it.

    On box I created a folder called digibit and dragged all the configs to that folder.

    Now I used putty in typed
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    this will put putty in the digibit folder

    Now I used a simple command to rename all the .ovpn files to .conf
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    Now to add password.txt to each conf file with one command I used
    Code:
    [ Only registered users can see the bbcode. Click Here To Register... ]
    Then created a password.txt in etc/openvpn and added my username and password

    So now I have all the configs in /digibit I can just drag the server I want to etc/openvpn and start openvpn.

    Unfortunately I,m not sure how to get the script to move one selected conf to etc/openvpn with using country at the top, but this works quite well.

    On a side note I have seen a plugin that should allow you to switch configs that are on hdd/vpn but I haven't had chance to test it yet
     
  5. Damo666

    Damo666 Forum Supporter

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

    dsayers2014 TK Veteran

    9,536
    1,124
    Not everyone uses wooshbuild and I dont think wooshbuild has a build for every enigma2 box
     
  7. Damo666

    Damo666 Forum Supporter

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

    dsayers2014 TK Veteran

    9,536
    1,124
    No and only do that if @wooshman says its ok to do so.
     
    wooshman likes this.
  9. thomaskieron

    thomaskieron Registered

    328
    6
    hasn't downloaded the ipchecker plugin
     
  10. dsayers2014

    dsayers2014 TK Veteran

    9,536
    1,124
    Running the script?

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

    thomaskieron Registered

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

    thomaskieron Registered

    328
    6
    it's still not there
     
  13. dsayers2014

    dsayers2014 TK Veteran

    9,536
    1,124
    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

    328
    6
    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 TK Veteran

    9,536
    1,124
    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. dsayers2014

    dsayers2014 TK Veteran

    9,536
    1,124
    So are you changing username and password between ' ' ?
     
  17. thomaskieron

    thomaskieron Registered

    328
    6
    yep, username and password as per the MPN account screen
     
  18. dsayers2014

    dsayers2014 TK Veteran

    9,536
    1,124
    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
     
  19. thomaskieron

    thomaskieron Registered

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