I have a very specific requirement for my setup.
I have bought a third-party VPN (e.g. ExpressVPN) for personal use. I use Mac's inbuilt client to connect to this. The corresponding network interface is called ppp0
.
My workplace requires me to use the Cisco Anyconnect VPN (referred to as "workVPN") with split tunneling. The corresponding network interface is called utun1
.
Therefore my current setup is as follows: Irrespective of the checkbox in PersonalVPN to "send all data through this VPN", when I connect to WorkVPN through Cisco Anyconnect, this is the routing:
Data to Work -> utun1 -> ppp0 -> en0 -> PersonalVPN Server -> WorkVPN server -> Data sent to work server
Other data -> ppp0 -> en0 -> PersonalVPN Server -> Internet
.
Instead, I want two separate connections: I would like to send all my internet traffic through ppp0
except the ones that pass through utun1
. i.e.
Data to Work -> utun1 -> en0 -> WorkVPN server -> Data sent to work server
Other data -> ppp0 -> en0 -> PersonalVPN Server -> Internet
.
What I understand after going through everything on the Internet is to update the routing tables. But that doesn't solve the issue. Because according to the routing tables, the data is being routed to correct network interfaces. Using traceroute
for debugging also doesn't help, because the first entry in the traceroute
shows the gateway. And the gateway entry is correct because the packet is actually going to that VPN specific gateways. The question is whether the WorkVPN packet is going through the personal VPN server or not.
Here are specific queries:
- The difference in speed to download large files from the work servers (with work VPN on) and with/without personal VPN is high. My hypothesis is that the underlying interface of
utun1
isppp0
and noten0
. Is there a better way to confirm this? Traceroute has first entry to the gateways, which are correct (because of correct routing tables). - Is there a way to somehow tell the Mac OS to send data from
utun1
throughen0
? - What is the point of "Send all data through this proxy" in the settings of Mac's inbuilt VPN client? If I don't select it, then what happens?
I can provide more information if anything is unclear.
Thank you.
Edit: My problem is different from other problems like this because I am not asking for proxy requirements through different sources. It is also different from all questions related to splitting the traffic manually because they are being split correctly in my setup.