đź”’

How to use Mullvad VPN? (Split tunneling on Windows and Linux)

This is a step-by-step guide on how to use Mullvad VPN.

Getting started

To buy a subscription, head over to https://mullvad.net/en/account/#/create/, follow the steps to create an account, and then download and install an app for your OS.

image

Once you launch the app, you should see the login screen.

image

Upon logging in with your account number, you will see the main screen.

image

Select the desired location from the list and click “Secure my connection”.

image

Congratulations! You are now connected to the VPN. Verify your connection on a website like

https://ifconfig.co/. As the last step, click on the cog icon at the top right and go to “Preferences”. Toggle settings as you see fit.

image

Using VPN with Cisco AnyConnect

Some companies use AnyConnect to control the remote access to the internal infrastructure. AnyConnect overrides the device’s DNS settings, which many VPNs, including Mullvad, will not allow to do. You will need to launch the app in a split tunnel to resolve it. I will demonstrate this using https://www.infradead.org/openconnect/, which is a command line client, but this approach should work with all Cisco AnyConnect clients.

After connecting to Mullvad VPN, let’s try to connect directly.

$ sudo openconnect --protocol=anyconnect <host> -b
image

The connection fails.

To fix this, quit the client and go to Settings > Advanced > Split tunneling.

Find your client in the list and tap on it, which will launch it outside the VPN. If you use a command line client, open any terminal app. Note that some built-in terminals are not supported, so you may need to install a third-party terminal.

Let’s try to connect now.

$ sudo openconnect --protocol=anyconnect <host> -b

You are now successfully connected to the VPN and AnyConnect at the same time. Make sure to stop AnyConnect when you don’t work with private resources.