Continuing the discussion from Qubes-vpn-support and firewall infrastructure:
You could do the copy with a command in dom0 e.g.:
qvm-run sys-vpn ācp whatever.conf /rw/config/vpn/ā
Then wrap that in a script that also shuts down and restarts sys-vpn or reconnects the vpn properly. You could then assign the script a shortcut.
You could go the whole hog and setup an rpc call that prompts for a vpn location but I never got round to that
Recently I have switched to installing the ProtonVPN Linux app in a VPN qube. I use this app to switch servers. It has a kill switch too. I just have a script that launches the app when the qube starts. I think mullvad has a Linux app as well which could be the easiest way to switch servers.
I also found this guide really helpful, but it is for openvpn not wireguard.
When I ran wireguard I just had it locked to one server. But had multiple qubes, each pointing to different servers then I would just switch VPN qubes.
Iām sure there is a way to do it with wireguard, but I gave up in the end.
For now Iāve settled down with a couple of wireguard proxyvms and an openvpn proxyvm.
The latter has been created following the guide mentioned by h110w: Iāve added some servers to it so that I can easily switch between them with network manager. Itās not as practical as the official app, but Iāve read arguments against using it in the forum. The guide mentions that the firewall stops working well if you create more than 20ish rules, thus effectively limiting me to 20ish servers, does anybody know if thatās still the case?
Wireguard proxyvms have been setup with Qubes-vpn-support. Iād like to learn how to make a script like that proposed by Uqube and Iāll dig into it when I have more time, but I fear that would not be super-practical anyways, since after every server switch Iād still have to wait for appqubes+firewall+proxyvm to shutdown and restart, so Iāll end up rarely switching server anyways. For now Iāll use them with a fixed server like h110w said.
Thank you both for your help!
Hi @Newb,
maybe you like my solution: I got a qube for each serverā¦
sys-njalla
sys-ivpn-dallas
sys-ivpn-chicago
sys-ivpn-germany
sys-ivpn-sweden
sys-ivpn-japan
etc
and a simple script:
#!/bin/bash
# switch from $1 to $2
qvm-start --skip-if-running sys-$2
qvm-prefs sys-vpn netvm sys-$2
qvm-shutdown --quiet sys-$1
ā¦ thatās it. I use it like this:
[user@dom0]$ switch-vpn ivpn-sweden njalla
These qubes are based on a template obviously and hence tiny (98 MB) so
they donāt need a lot of space and you always run only one at a time so
you also donāt use more memory.
Whatās not to like?
BTW, that also solves the ātoo many servers in the firewall listā issue.
I really like wireguard over ovpn so there is another solution I am currently working on at the moment where I will use rofi/dmenu to switch between wireguard config files and then it runs a script that removes the ip addresses of the previous config file rom the firewall rules in the VPN qube and adds the new ip addresses of the new config file. I will keep you posted with my progress