Answer the question
In order to leave comments, you need to log in
How to make a different route for a separate application?
Good afternoon.
Ubuntu. Several outgoing vpn connections are up.
It is necessary that a certain application make all its connections through the desired vpn connection. Where the application goes is not known in advance.
Where to dig?
Answer the question
In order to leave comments, you need to log in
you need linux network namespace
blog.scottlowe.org/2013/09/04/introducing-linux-ne...
https://www.opennet.ru/tips/2683_linux_namespace_g...
You can try to mark packets according to the owner criterion and apply different routing tables for them.
I tried it myself for a very long time, it seemed to work. There is a little on the link tiebing.blogspot.ru/2015/12/linux-routing-based-on... well, in the search for iptables mark and ip route mark
The problem is in determining the correct owner, in some cases you can do it by uid, in in some cases, you need to write a script that adds and removes pid in chains
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question