Wednesday, May 29, 2019

EdgeRouter X VPN connection to mullvad.net 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 mullvad.net .

Recently I had to repeat the procedure and found the files available at mullvad.net 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 mullvad.net site will contain this information in a file called pass.txt.

Then ssh into the router and configure the VPN:

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

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:

#configure
#set service dns forwarding name-server 193.138.218.74
#commit
#save

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