I have an SSH tunnel set up (on Linux) and I want to route all my network traffic through it, except that I also have Tor running and I do not want Tor traffic to go through the SSH tunnel. I can route all traffic through the SSH tunnel by using
redsocks (I make SSH run a SOCKS proxy, run
redsocks, and use an
iptables rule to redirect all traffic to
redsocks, so all traffic goes through the tunnel).
However I do not know how to have Tor avoid the tunnel and make direct connections...
iptables used to have a
--pid-owner option which would have been perfect for this but it was removed because it could not be implemented properly.
So, what is the best way to do this, now? (The SSH tunnel approach is fixed: I cannot switch to a different kind of VPN.)