How can I make mullvad remember my account number in the fedora template?

Hi,

I have installed Mullvad VPN directly on fedora-41 template, instead of making it its own qube and having that be the networking template for new qubes as I was having trouble with the former.

I am trying to type in the account number in the fedora-41 template but when I try to do so it says ‘login failed, api.mullvad.net is blocked, please check your firewall’

Is there any way to make it so I can login to mullvad on the template (maybe just even once) so the app knows my account number?

When I use any fedora based qube I have to retype in the account number. I would like to store it in the template so it applies to all fedora based qubes.

Thank you

1 Like

By default, templates dont have an netvm because connecting them to the internet is consdidered a security risk.

There are different ways, but what I do is adding

binds+= ( '/etc/mullvad-vpn' )

to /rw/config/qubes-bind-dirs.d/50_user.conf in the AppVM and thats it: If you log in into Mullvad, it should be persistent after reboot.

1 Like

Hi,

It would be better to install mullvad in a template, then create a qube in which you connect to mullvad app, then make this a disposable template and create a disposable qube using the mullvad qube as a template and make it providing network.

This way, you have a vpn qube that is disposable, so if it gets compromised, changes will not be persistent.

3 Likes

I agree with @solene, but here’s another idea to achieve what you’re asking for:

Edit note: i assumed that the config is stored in the user space. Maybe I’m wrong!

  1. Type the account number in an AppVM qube
  2. Copy the config file of mullvad from this AppVM to the template but under /etc/skel, not /home
  3. Create a new AppVM and it should work

From an existing AppVM, you can link the config file in /home/user to the one in /etc/skel.

1 Like

I don’t know if this happens for Mullvad, but some other provider App requires to login once in a while, in my case I would start the qube disposable template to log-in again.

1 Like

I agree this is better, this is what the guide on here says. However I had trouble doing this on 4.2, and I trust Mullvad.

1 Like

I don’t have that folder /qubes-binds-dirs.d/ in my AppVM?

Just

qubes-firewall-user-script suspend-module-blacklist
rc.local

1 Like

You can just add the folder in the appVM and it will persist. Qubes docs has the complete instructions at:

2 Likes

Hi,

This did not work. I have
binds+= ( ‘/etc/mullvad-vpn’ )
in the

/rw/config/qubes-bind-dirs.d/50_user.conf

of the AppVM.

Any help?

1 Like

How can I find where the config is stored? Sorry, I am useless!

1 Like

I don’t know how mullvad works. I was about to suggest you to look for something like /home/user/.config/<SOME MULLVAD FOLDER> but there is other possibilities.

You can try to create an AppVM, clone it, register your account number and compare the two file systems?

1 Like

I’m currently using the Mullvad app in an app qube, and it works fine with this bind-dir configuration.

I have this in /rw/config/qubes-bind-dirs.d/50_mullvad.conf

binds+=( '/etc/mullvad-vpn' )

Before logging in, make sure to restart the app qube to create the bind mount.

4 Likes

This worked! Dont know what the hell I did before. Thanks!

2 Likes

Could you mark @DVM’s answer as the solution? Especially because all I wrote here was garbage :sweat_smile: