Wednesday, May 29, 2019

EdgeRouter X VPN connection to UPDATED

NB: Network speed my be reduced after this. On my 100/100 line I got 35/35.  "Unknown" reported 15/18.

In an earlier post I documented a procedure for setting up a EdgeRouter X VPN connection to .

Recently I had to repeat the procedure and found the files available at were different.

Choosing the android setup you got a file named something like "mullvad_config_xx.ovpn". The certificate itself are included inside this file.

1) Make sure the time on the edge router are correct(?). UTC were wrong for me when connecting from Sweden to Norway. NO/SE time zone worked OK.

2) In the "mullvad_config_xx.ovpn add the following to the line reading "auth-user-pass": " /config/auth/pass.txt"

3) Upload the "mullvad_config_xx.ovpn" to "/config".

4) Create a file in "/config/auth/" called "pass.txt" contaning the mullvad account number in line 1 and "m" in line 2. Some downloads from the site will contain this information in a file called pass.txt.

Then ssh into the router and configure the VPN:

#set interfaces openvpn vtun0 config-file /config/mullvad_config_no.ovpn

And in the GUI, under "Firewall/NAT", select "Add source NAT"

description -> "Mullvad VPN"
outbound int-> vtun0
Trans         ->   Masquerade
Protocol     ->  All

And save.

The final adjustment is changing the DNS to the mullvad DNS:

#set service dns forwarding name-server

Finally, connect to the IAmMullvad site and make sure everything is OK.


  1. Hi, I'm trying to configure my edge router x with mullvad. but in the configuration he tells me:failed to start openvpn tunnel.
    when I do the first commit. the edgerouter is configure with configuretion sandard in port eth0 is the modem and eth1 my pc. Thank's.
    Have you tried the wireguard?

    1. everything ok solved with a password problem. speed test is very slow at 10% of my connection do you have any alternative way? wireguard type?

    2. Thanks for the feedback.

      The speed is OK for me. You could try another mullvad server. I will surely check into the wireguard options when I get to it.


  2. I tried 5 servers the one closest to me goes to 15 / 18mbs my speed is 200mbs is there a way to speed it up? thanks

    1. Hi, you are absolutely right. I speed tested my 100/100 line and I got 35/35. I will update my post to reflect this.

      I will update the firmware on my edge and check the speed again.