How can we help you?

How to configure an EdgeRouter or Ubiquiti devices?

These instructions have been written using this EdgeRouter device: EdgeRouter ERLite-3 FW v1.9.1 and using a Linux OS.

Here are instruction to setup OpenVPN connection on EdgeRouter via SSH:

  1. Create a new file on your computer and call it nordvpnauth.txt for example. Open it and type in your NordVPN Username in the first line and Password in the second line:
    • usernamepassword
  2. Then please download our .ovpn files from here.
  3. Choose the server you want to connect to. For example if you want to connect to Germany 84 server via UDP - please open the de84.nordvpn.com.udp1194.ovpn file and change this line:
    • auth-user-pass
    • into -> auth-user-pass /config/openvpn/nordvpnauth.txt
    • and then save the file.
  4. Your configured file should look like this:

     

    #           _   _               ___     ______  _   _
    #          | \ | | ___  _ __ __| \ \   / /  _ \| \ | |
    #          |  \| |/ _ \| '__/ _` |\ \ / /| |_) |  \| |
    #          | |\  | (_) | | | (_| | \ V / |  __/| |\  |
    #          |_| \_|\___/|_|  \__,_|  \_/  |_|   |_| \_|
    #
    client
    dev tun
    proto udp
    remote 185.143.230.237 1194
    resolv-retry infinite
    remote-random
    nobind
    tun-mtu 1500
    tun-mtu-extra 32
    mssfix 1450
    persist-key
    persist-tun
    ping 15
    ping-restart 0
    ping-timer-rem
    reneg-sec 0
    remote-cert-tls server
    #mute 10000
    auth-user-pass nordvpnauth.txt
    comp-lzo
    verb 3
    pullfast-io
    cipher AES-256-CBC
    <ca>
    -----BEGIN CERTIFICATE-----


     

    MIIExzCCA6+gAwIBAgIJAKY5JhFM+4THMA0GCSqGSIb3DQEBBQUAMIGdMQswCQYDVQQGEwJQQTELMAkGA1UECBMCUEExDzANBgNVBAcTBlBhbmFtYTEQMA4GA1UEChMHTm9yZFZQTjEQMA4GA1UECxMHTm9yZFZQTjEZMBcGA1UEAxMQZGU4NC5ub3JkdnBuLmNvbTEQMA4GA1UEKRMHTm9yZFZQTjEfMB0GCSqGSIb3DQEJARYQY2VydEBub3JkdnBuLmNvbTAeFw0xNjA4MjMxMzUzNDBaFw0yNjA4MjExMzUzNDBaMIGdMQswCQ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01juhBw+ZoS5iUd3xvfgZvgaZxBKrJcQO1G1cvJ6lyOhknfafcwdCvzn1upM1ECZfzhrJdz3yy32nNDfpMUptgK8W0PO35qyLWvH69wioua0gMgKbwu7LSFyPasKi7m6IpW+lYaElsux1+CE6gNRhZxPwt1czpMrkKR6Pfz7c6GQy6HLOl2zyWhRGpCXSKtyH1BUBEQ4Y7l2lCDVcLk5mjiPmTo/Jt4OspzUfCf


    ----END CERTIFICATE-----
    </ca>
    key-direction 1
    <tls-auth>
    #
    # 2048 bit OpenVPN static key
    #

    -----BEGIN OpenVPN Static key V1-----

    185d51df3eaa9af0321003d6172b4434f4f8011c680c1bfa559b2709147200d63b091db916ad6642fe5140aa9766b5a74389fbecbc9907b6d5eb02cbdaed679247423a46cf5a4a1880a22c0fc20af9665f5e869da5809d732445ac754faf3917a0cbd69ee4d0b7c1710a5d1d52e2c5f52bc53c1caef73926e8d052f6ddcf6634ca0263911ad41f0b2008baecca039b8dcec45f28096152f637ed802442e5351969bc6ae14460f9030520874aeb8466a9aae4ec6ab847ddaf85eb71e36e2cde1f83ce7f17cfc2181fda8930fec88d3b0be6515e6b5664d3e114ea8c9c4a382cdd32d73a100d34135d2f1e7f787157f6d40d540f9063d931f89c0fe03ed0eae0a1

    -----END OpenVPN Static key V1-----
    </tls-auth>

     

  5. Now access your EdgeMax routers via ssh. On UNIX-like machines:

    • ssh ubnt@routersIP

type in the password of your EdgeRouter.

On Windows download this app: https://www.bitvise.com/ssh-client-download :

win1.png

6. Then perform these commands:

sudo -icd /config/mkdir openvpnchmod 777 openvpn

7. If you're using Linux, disconnect from SSH and then copy the created files nordvpnauth.txt and de84.nordvpn.com.udp1194.ovpn into your EdgeMax routers /config/openvpn directory via scp:

scp nordvpnauth.txt ubnt@routerIP:/config/openvpn
scp de84.nordvpn.com.udp1194.ovpn ubnt@routerIP:/config/openvpn
In order to copy these files into the EdgeRouter while using Windows, upload them via SFTP:

win2.png

8. Then access your router via ssh again and type in:

sudo -iconfigureset interfaces openvpn vtun0 config-file /config/openvpn/de84.nordvpn.com.udp1194.ovpncommitsave9. To check the connection log you can type in:
run show log

And scroll down till you see "Initialization Sequence Completed". That means your router is successfully connected to our service. You can also check this website to check if you are connected.

Related Articles