So far I’ve configured a container to run transmission service and openvpn service:
containers.downloads = { config =
{ config, pkgs, ... }:
{
services.openvpn.servers = {
nordvpn = {
config = '' config /root/default.ovpn '';
autoStart = true;
};
};
# How do I configure all traffic from this service to go through the vpn above?
services.transmission.enable = true;
};
enableTun = true;
autoStart = true;
};
I can’t figure out how to get the transmission traffic to go through the vpn only, if the vpn is down I want transmission to be down as well. I figure there is a way to do this using user permissions and having the transmission service run as a specific user, but I’m not sure where to find an example for that, and my networking configuration skills aren’t polished enough to take anything more than a rough pass.
The fact that it is in a container is not inherently special, but I figured the isolation would make it easier to have the vpn running without forcing other user traffic through it.