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

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

How to connect to NordVPN as a client using Voxel firmware

Discussion in 'NETGEAR AC Wireless' started by kamoj, Mar 19, 2019.

  1. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    The most convenient way is to use an USB-device as described in Voxel documentation.
    This is a Lazy Dog for those who want to do it without USB.

    The short example:
    Code:
    mkdir -p /etc/openvpn/config/client/
    cd /etc/openvpn/config/client/
    echo "username" >nordvpn.auth
    echo "password" >>nordvpn.auth
    server="$(curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations' | jq --raw-output 'limit(1;.[])|.hostname')"
    wget -O /etc/openvpn/config/client/nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/$server.udp1194.ovpn
    sed -i 's/auth-user-pass/auth-user-pass nordvpn.auth/g' nordvpn.ovpn
    /etc/init.d/openvpn-client start
    
    The long explanatory way:
    Pre-requisites:


    Do It:
    1. Logon (From your web-browser):
      http://www.routerlogin.net

    2. Enable Telnet:
      http://www.routerlogin.net/debug.htm
      Check (Set a tick in the box for) "Enable Telnet". (No apply needed)

    3. Login to the router using telnet:
      Hold down the Windows Key, then press the “R“ key.
      The Run dialog box appears. In the Open: window, type:
      cmd
      Click OK.
      Code:
      telnet www.routerlogin.net
      The password is the same as from the normal router login page http://routerlogin.net

    4. Create the directory to put your OpenVPN-client configuration:
      Code:
      mkdir -p /etc/openvpn/config/client/
    5. Change to the directory:
      Code:
      cd /etc/openvpn/config/client/
    6. Create your NordVPN login credentials (user id and password) file:
      Code:
      echo "username" >nordvpn.auth
      echo "password" >>nordvpn.auth
      
    7. Download your preferred server configuration file from NordVPN:
      Download the server configuration file from NordVPN
      In a web-browser go to: https://nordvpn.com/ovpn/

      Find the line with the server you want to connect to.

      Right-click "Download UDP" to the right of the server name and chose: "Copy link address"

      In your router telnet windows, write (ending with a blank/space character, and without pressing enter!)
      Code:
      wget -O nordvpn.ovpn 
      #Right-click at the end of what you just wrote to paste the server name, ending up with a line like:
      Code:
      wget -O nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/uk1000.nordvpn.com.udp1194.ovpn
      #Press the return key to download the server configuration file.

      Download the server configuration file from NordVPN
      In a web-browser go to: https://nordvpn.com/servers/tools/
      • Adjust server preferences: Select preferred country
      • Show advanced options:
        "Standard VPN"
        Select Security Protocol: "OpenVPN UDP"
      • Server recommended for you: Show available protocols:
        Right-click "Download config" and chose: "Copy link address"

      In your router telnet windows, write (ending with a blank/space character, and without pressing enter!) :
      Code:
      wget -O nordvpn.ovpn 
      #Right-click at the end of what you just wrote to paste the server name, ending up with a line like:
      Code:
      wget -O nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/se234.nordvpn.com.udp.ovpn
      #Press the return key to download the server configuration file.

      Code:
      #Use one of these examples depending on where you want to connect:
      
      #To get the server recommended by NordVPN (nearest you with lowest load):
      server="$(curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations' | jq --raw-output 'limit(1;.[])|.hostname')"
      wget -O nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/$server.udp1194.ovpn
      
      #UK:
      wget -O nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/uk1000.nordvpn.com.udp1194.ovpn
      
      #US:
      wget -O nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/us1859.nordvpn.com.udp1194.ovpn
      
      #Sweden:
      wget -O nordvpn.ovpn https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/se108.nordvpn.com.udp1194.ovpn
      
    8. Change the server file to recognize your login information:
      Code:
      sed -i 's/auth-user-pass/auth-user-pass nordvpn.auth/g' nordvpn.ovpn
    9. Start the OpenVPN-client
      Code:
      /etc/init.d/openvpn-client start
    10. That's all! The OpenVPN-client will be started automatically at every reboot.
      You have to repeat these steps after updating the router firmware.

    11. To see the log-file:
      Code:
      cat /var/log/openvpn-client.log
    12. To see status and more info about the OpenVPN-client, install my add-on:
      https://www.snbforums.com/threads/k...800-x4s-and-r9000-x10-temperatures-a-o.55063/
     
    Last edited: Apr 12, 2019
    Bendon, L&LD, avtella and 3 others like this.
  2. tlavarea

    tlavarea Occasional Visitor

    Joined:
    Nov 3, 2018
    Messages:
    18
    Thank you for the details kamoj. Unfortunately I can't get VPN working. I've tried with both Mullvad and NordVPN and no luck. Log message is always the same. Any ideas?

    Code:
    /etc/init.d/openvpn-client start
    PING www.google.com (172.217.12.132): 56 data bytes
    
    --- www.google.com ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 37.3/37.7/38.4 ms
    Please wait...
    Error: OpenVPN client start failed.
    /var/log/openvpn-client.log
    Code:
    Tue Mar 19 14:07:11 2019 OpenVPN 2.4.7 arm-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
    Tue Mar 19 14:07:11 2019 library versions: OpenSSL 1.0.2q  20 Nov 2018, LZO 2.10
    Tue Mar 19 14:07:11 2019 WARNING: --ping should normally be used with --ping-restart or --ping-exit
    Tue Mar 19 14:07:11 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
    Tue Mar 19 14:07:11 2019 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
    Tue Mar 19 14:07:11 2019 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
    Tue Mar 19 14:07:11 2019 nice -20 succeeded
    Tue Mar 19 14:07:11 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]195.181.168.220:1194
    Tue Mar 19 14:07:11 2019 Socket Buffers: R=[163840->1048576] S=[163840->1048576]
    Tue Mar 19 14:07:11 2019 UDP link local: (not bound)
    Tue Mar 19 14:07:11 2019 UDP link remote: [AF_INET]195.181.168.220:1194
    Error: OpenVPN client start failed.
    Tue Mar 19 14:07:26 2019 event_wait : Interrupted system call (code=4)
    Tue Mar 19 14:07:26 2019 SIGTERM[hard,] received, process exiting
     
  3. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    No, not really.
    But you buffers gets too big!
    Voxel client sets them to 786432, but you have 1048576.
    So maybe your .ovpn file overrides Voxels settings.
    What is your router?
    You seem to try to connect to "datapacket.com". I don't even know they have an OpenVPN server.
    Maybe you are trying to run your own server on a rented computer?
    That is not either NordVPN or Mullvad, so I suggest you start a new thread about your issue!

     
  4. tlavarea

    tlavarea Occasional Visitor

    Joined:
    Nov 3, 2018
    Messages:
    18
    I have the R7800 router running Voxel v64 firmware.

    This is really bizarre, because now it's working and I didn't change anything. I tried the file you have in your instructions
    https://downloads.nordcdn.com/configs/files/ovpn_legacy/servers/uk1000.nordvpn.com.udp1194.ovpn and other ovpn files from both providers to no avail. Now they're all working.

    I followed your above directions word for word.

     
  5. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    8,595
    With these relatively timidly powered devices such as our routers are, sometimes just being patient long enough is enough to let them finally configure themselves as we direct them. ;)
     
  6. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    Yes, very strange...
    Which service do you find the fastest?

    I just signed up at NordVPN for a 7-day trial to test the code, and it worked perfectly.
    But I had very varying speed depending on connected server. Even when using the by NordVPN recommended server I only got 10 Mbps down+up sometimes.

    I tried different servers and the speed difference between servers is terribly big.
    It's impossible to know which server to connect to.

    The best I found:
    At this server I got a maximum speed of: 106/9 Mbps:
    https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/se114.nordvpn.com.udp.ovpn

    At this server I got a maximum speed of: 124/9 Mbps:
    https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/se144.nordvpn.com.udp.ovpn

    I have contacted NordVPN support that were very fast and helpful.
    But they confirm that there is no way for the router to know which server to connect to,
    so speed can be very slow if you are not lucky.

    They asked me to use the "recommended server" as I described above, but that does not give better speed for me.
    It seems completely random to me.

    The support will make a suggestion to enable some generic .ovpn file/server that can do a correct speed balancing/estimate.

    For me NordVPN is not usable due to the enormous difference between their routers, and no way to find a fast one.
    I'll cancel my trial and hope for good news from NordVPN in the future.

     
  7. tlavarea

    tlavarea Occasional Visitor

    Joined:
    Nov 3, 2018
    Messages:
    18
    NordVPN has been good for me in the US. Which provider do you use?

    I've been messing around with VPN and something got hosed I can't get out to the internet at all. I can't even ping sites from the command line on the router whether connected to VPN or not.

    Any ideas?

     
  8. Bendon

    Bendon New Around Here

    Joined:
    Apr 12, 2019
    Messages:
    5
    i like this tutorial
    Unfortunately I can't get VPN working

    [email protected]:/etc/openvpn/config/client$ /etc/init.d/openvpn-client start
    PING forcesafesearch.google.com (216.239.38.120): 56 data bytes

    --- forcesafesearch.google.com ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 30.5/30.5/30.7 ms
    Please wait...
    Error: OpenVPN client start failed.
    [email protected]:/etc/openvpn/config/client$
    [email protected]:/etc/openvpn/config/client$ cat /var/log/openvpn-client.log
    Options error: In /etc/openvpn/config/client/surfshark.ovpn:1: Maximum option line length (256) exceeded, line starts with <!DOCTYPE html><html><head><meta name="google" content="notranslate"><meta http-equiv="X-UA-Compatible" content="IE=edge;"><style>@font-face{font-family:'Roboto';font-style:italic;font-weight:400;src:local('Roboto Italic'),local('Roboto-Italic'),url(//font
    Use --help for more information.
    Error: OpenVPN client start failed.
    Options error: In /etc/openvpn/config/client/surfshark.ovpn:1: Maximum option line length (256) exceeded, line starts with <!DOCTYPE html><html><head><meta name="google" content="notranslate"><meta http-equiv="X-UA-Compatible" content="IE=edge;"><style>@font-face{font-family:'Roboto';font-style:italic;font-weight:400;src:local('Roboto Italic'),local('Roboto-Italic'),url(//font
    Use --help for more information.
    Error: OpenVPN client start failed.
    [email protected]:/etc/openvpn/config/client$

    what wrong with this
    Thank you for your concern
     
  9. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    You have a surfshark.ovpn file that is incorrect?!
    How did you get that one?
    Please check it with:
    Code:
    cat /etc/openvpn/config/client/surfshark.ovpn
     
  10. Bendon

    Bendon New Around Here

    Joined:
    Apr 12, 2019
    Messages:
    5
    first sorry my English is bad
    i upload file to gdrive and download it
    because my vpn config in zipfile


    Capture.PNG Capture1.PNG
     
  11. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    No problem!
    I don't know what you have done.
    Your file is not a zip-file.
    Your file is not a .ovpn-file either.

    To get the .ovpn file for surfshark, do like this (instead of point 7 in my first posting):
    Code:
    mkdir -p /tmp/surfshark
    cd /tmp/surfshark
    wget https://account.surfshark.com/api/v1/server/configurations
    unzip configurations
    \rm configurations *tcp*
    \ls
    #Now copy one of these .ovpn files, e.g.
    \cp sg-sng.prod.surfshark.com_udp.ovpn /etc/openvpn/config/client/surfshark.ovpn
    cd /etc/openvpn/config/client/
    
     
    Last edited: Apr 12, 2019
    Bendon likes this.
  12. Bendon

    Bendon New Around Here

    Joined:
    Apr 12, 2019
    Messages:
    5
    ty, thats work kamoj
    but, my dns leaks
    can't open blocked sites
    Capture2.PNG Capture3.PNG
    e.g
    Capture4.PNG
     
  13. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    Run the commands:
    Code:
    nvram set dnscrypt2=1
    nvram commit
    /etc/init.d/dnscrypt-proxy-2 restart
     
    Bendon likes this.
  14. Bendon

    Bendon New Around Here

    Joined:
    Apr 12, 2019
    Messages:
    5
    i reboot and enable dnscrypt2 thats work.
    My VPN server is in Singapore
    , try speedtest dns in netherland???
    that makes my ping high.
    Try stubby just the same
    can i disable dnscrypt2 and stubby?
     
  15. kamoj

    kamoj Senior Member

    Joined:
    May 12, 2017
    Messages:
    317
    Code:
    nvram unset dnscrypt2
    nvram unset stubby
    nvram commit
    /etc/init.d/dnscrypt-proxy-2 stop
    /etc/init.d/stubby stop
    
    PS
    This thread is about NordVPN.
    I think you shall start a new thread with your Speedtest and ping problems.

     
    Bendon likes this.
  16. Bendon

    Bendon New Around Here

    Joined:
    Apr 12, 2019
    Messages:
    5
    ok, thank you for your help and patience
    :):):)