I’m new to configuring wireguard & VPNs on Linux, I asked claude for a lot of input and am wondering if there are any faults in what I came up with or if there are better practices or things to do.
- I’m using NetworkManager with iwd for connecting to wifi, since KDE’s wifi menu supports it.
- I have ProtonVPN Plus, for the whole system it works with either the app or with a wireguard configuration imported into KDE. For this I just tested with the former.
- For per-app connections claude suggested vopono, I set up the systemd unit for it as recommended in the docs. I use commands like this:
vopono exec --custom wireguard-config.conf -i eth0 --protocol wireguard browser-name.- However it looks like every time I start my PC up I need to do this command (provided by claude) to fix priority:
sudo ip rule add from10.200.0.0/1lookup main priority 100(I could have it run automatically on startup or add it to my nix config, but am wondering if something like is normal for this).
- However it looks like every time I start my PC up I need to do this command (provided by claude) to fix priority:
- I mainly want to have different IP addresses in different browsers.
Right now this is my NixOS configuration:
networking = {
hostName = "my-pc-host-name";
networkmanager.enable = true;
networkmanager.wifi.backend = "iwd";
firewall.checkReversePath = false;
wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
networkmanager.unmanaged = [
"interface-name:vo_*"
];
};
I’m not sure if there’s a good way to bind a program to an interface, if the program doesn’t do it natively. Personally I would run the programs in docker containers, and bind them to separate gluetun containers.
I don’t think this is the right solution for you, but just in case somebody else is looking to have a setup like that without a hassle:
You have to subscribe to their VPN, but then you can set everything on a per app basis: vpn or no, country, amount of hops etc. I’ve been using it for years now.
They have recently confirmed that they are working on the ability to add third party VPNs and also set them per app, but I’m not sure whether it will still require a subscription or when that feature will be released…
I’m not confident in what I’m about to say so look this up to make sure. But I believe this setup “prefers” vpn connection so if there is a connection drop it falls back to no vpn connection AKA no killswitch. Also I don’t think it switches back to vpn automatically when the vpn connection is restored.

