Hi all,
I’m currently trying to create a ‘post-install script’ for my qubes setup, that is I run the script once after a fresh qubes install and everything is setup-up for me.
I intend to create this using a salt formula, I have used the following guide to teach myself the basics of salt in qubes: Configuration Management — Fieldnotes documentation
I am trying to come up with the best strategy for VPN access, best practices outlined by Mullvad for Qubes are specified here: WireGuard on Qubes OS | Mullvad VPN
Simply put, it recommends setting up a separate qube (ProxyVM) which will then function as another qubes NetVM.
The main part of this process is generating a .conf file using WireGuard configuration file generator.
This .conf file specifies a single wireguard server that the ProxyVM qube will connect to. This is somewhat of an issue as in order to follow best practices and if I want all server options available (like in the Mullvad app) I need to create a ProxyVM qube for each and every available Mullvad server endpoint.
As I mentioned earlier I am writing a salt formula to auto-setup qubes for me.
The salt formula would loop over each .conf file and generate a ProxyVM qube for each connection, each individual ProxyVM qube would follow the naming convention of the .conf file being used.
i.e.
-
‘al-tia-wg-001’ - this is a ProxyVM qube that connects to server 1 in Tirana, Albainia
-
‘al-tia-wg-002’ - this is a ProxyVM qube that connects to server 2 in Tirana, Albainia
-
… and so on
In order to run the salt formula I would bulk download all of the .conf files (Mullvad allows you to do this) and copy all of the .conf files along with the salt formula into the /srv/user_salt
directory in dom0
and execute the salt formula.
Then when I want to connect to a different VPN endpoint (if for example something is region locked) I start the ProxyVM qube I intend to use & connect the AppVM qube that I am working in to the new ProxyVM.
I don’t anticipate changing the VPN server endpoint for an AppVM very often but the goal is to have access to all available server endpoints provided by Mullvad.
I am new to qubes - could anyone provide any feedback on what I have outlined?
Is there a better way to accomplish this that I am not aware of?
Thanks.