This guide explains how to setup a a VPN with ProtonVPN app on Qubes OS 4.2 using a Fedora template.
A cool thing with ProtonVPN is that they have a Free offer, although it comes with limitations it's nice. They seem also a legit service to use as per the trustable source https://www.privacyguides.org/en/vpn/
If you want to set up a ProtonVPN using WireGuard without the App, see https://forum.qubes-os.org/t/wireguard-vpn-setup/19141
sys-vpn-protonvpn-app
)qubes-firewall
network-manager
(this is required otherwise the App can't establish VPNs :woman_shrugging:)wget
is missing (that's the case on fedora 38 xfce by default), you can replace it by curl -OL
or install it with sudo dnf install wget
mkdir ~/.config/autostart
ln -s /usr/share/applications/protonvpn-app.desktop .config/autostart/
ℹ️ You may want to force all qubes traffic to go through the VPN and block non-VPN traffic. ProtonVPN app offers a killswitch. However, if the app crash, the killswitch wouldn't be guaranteed to work. Here is how to make it more secure.
Add the rules below in /rw/config/qubes-firewall-user-script
in the qube:
# Prevent the qube to forward traffic outside of the VPN
nft add rule qubes custom-forward oifname eth0 counter drop
nft add rule ip6 qubes custom-forward oifname eth0 counter drop
ℹ️ If you did not setup the killswitch, you may want to redirect all DNS queries to a custom server (9.9.9.9 in the current example) and blocking all other DNS servers.
# Redirect all the DNS traffic to the preferred DNS server
DNS=9.9.9.9
nft add chain qubes nat { type nat hook prerouting priority dstnat\; }
nft add rule qubes nat iifname == "vif*" tcp dport 53 dnat "$DNS"
nft add rule qubes nat iifname == "vif*" udp dport 53 dnat "$DNS"