I'm using a proprietary VPN client on my Ubuntu Linux work station (Astrill) which support several types of VPNs. One of these VPN types is OpenVPN, which creates a virtual interface
tun0 when connected.
What confuses is me is that when I choose OpenVPN in the client I have the option to only route the traffic from certain applications on my computer via the VPN, while the traffic from other applications does not use the VPN and leaves my computer via the physical interface.
I thought I kind of understand how routing in Linux works, but I can't see/understand how this VPN client manages to route the traffic differently per application.
When I enable this per-application routing I can see that the client adds the following entry to the routing table, but nothing else:
198.18.32.0/21 dev tun0 proto kernel scope link metric 950
There is not a single IPTables rule, so it's not done via IPTables.
Does somebody have a clue how it might be doing that?