I'd like to use my VPN for all network traffic except for the traffic from a single, arbitrary command. Is there a way to do this?
I understand there may be easier ways to do roughly what I want; for example, if my command were ssh, I could set up routing so that outgoing connections to port 22 don't go through the VPN. This has the limitation, though, that I have to know the ports my command uses, and that if I ran another ssh session at the same time, it would also not go through the VPN; I just want the one command to do that. I'd also like for this to work regardless of what ports the command uses or what addresses it connects to (which I haven't so far been able to find an example of anywhere).