How to route Cisco Anyconnect (work VPN) directly through Wifi instead of non-work VPN?

KK Patel

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:

  1. Data to Work -> utun1 -> ppp0 -> en0 -> PersonalVPN Server -> WorkVPN server -> Data sent to work server
  2. 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.

  1. Data to Work -> utun1 -> en0 -> WorkVPN server -> Data sent to work server
  2. 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:

  1. 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 is ppp0 and not en0. Is there a better way to confirm this? Traceroute has first entry to the gateways, which are correct (because of correct routing tables).
  2. Is there a way to somehow tell the Mac OS to send data from utun1 through en0?
  3. 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.

KK Patel

After going through a lot more answers and many more testing, I finally resolved all these queries.

  1. There is a tool called nettop for Mac OS. Using nettop -m route, one can observe live traffic through each route. It can help to debug the underlying route of Cisco Anyconnect. Download a large file and watch the relevant routes of nettop to see which routes and interfaces are being used for that download.

  2. It turns out, I had to add a route that connects through en0 interface, and don't have to let the MacOS's native VPN client update it. I used the following command to add the route (which is also mentioned in other relevant forums): sudo route change <IP-address> -iface en0 The IP address is the IP address of the VPN server that Cisco Anyconnect tries to connect to. You can see the IP address in the "Server Address" field in the Anyconnect Statistics window.

  3. This checkbox "Send all data through this proxy" acts as a default routing mechanism. Either:

    • not-select the checkbox and add some routes manually to pass through this VPN, or,
    • select the checkbox and add some routes manually to not-pass through this VPN.

I hope this helps someone who is looking to establish a similar setup.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Configuring Windows VPN Connection from Cisco AnyConnect

분류에서Dev

Cisco AnyConnect VPN 설치 오류

분류에서Dev

Cisco AnyConnect VPN | 인식되지 않는 키

분류에서Dev

Ubuntu 15.04의 Cisco AnyConnect 호환 VPN (openconnect)?

분류에서Dev

Route more traffic through VPN

분류에서Dev

Cisco AnyConnect VPN 클라이언트의 서버 인증서 문제

분류에서Dev

Cisco AnyConnect VPN 클라이언트의 서버 인증서 문제

분류에서Dev

Cisco AnyConnect VPN, 설치 문제, vpnui가 실행되지 않음

분류에서Dev

Cisco Anyconnect VPN (Linux)이 시작되지 않습니다.

분류에서Dev

Cisco Anyconnect VPN (Linux)이 시작되지 않습니다.

분류에서Dev

Connect to Untrusted VPN Server using Cisco AnyConnect via command line in Windows

분류에서Dev

Route Client Traffic Through VPN Tunnel

분류에서Dev

Is it possible to route only a specific application through a VPN?

분류에서Dev

Route Client Traffic Through VPN Tunnel

분류에서Dev

only route certain addresses through PPTP VPN?

분류에서Dev

Cisco AnyConnect VPN 클라이언트-회사 네트워크로 연결 방지

분류에서Dev

Cisco Anyconnect VPN에 대한 경고음을 비활성화 하시겠습니까?

분류에서Dev

Cisco Anyconnect VPN에 대한 경고음을 비활성화 하시겠습니까?

분류에서Dev

VPN과 로컬 네트워크를 동시에 사용하도록 Cisco VPN Anyconnect 구성

분류에서Dev

Error with Cisco VPN client driver

분류에서Dev

Can Cisco Anywhere VPN monitor/log what devices on a wifi are accessing if one of those devices is on it?

분류에서Dev

How to connect to VPN through Proxy Server

분류에서Dev

add a route for VPN with NetworkManager

분류에서Dev

Cisco AnyConnect Secure Mobility Client 3.1.03103. VPN 에이전트 서비스가 응답하지 않습니다

분류에서Dev

VPN through NetworkManager in Debian?

분류에서Dev

Cisco VPN Client hangs at "Opening cert store"

분류에서Dev

Cisco VPN 클라이언트

분류에서Dev

SSH 전용 Cisco VPN Connection?

분류에서Dev

How to make WiFi work automatically?

Related 관련 기사

  1. 1

    Configuring Windows VPN Connection from Cisco AnyConnect

  2. 2

    Cisco AnyConnect VPN 설치 오류

  3. 3

    Cisco AnyConnect VPN | 인식되지 않는 키

  4. 4

    Ubuntu 15.04의 Cisco AnyConnect 호환 VPN (openconnect)?

  5. 5

    Route more traffic through VPN

  6. 6

    Cisco AnyConnect VPN 클라이언트의 서버 인증서 문제

  7. 7

    Cisco AnyConnect VPN 클라이언트의 서버 인증서 문제

  8. 8

    Cisco AnyConnect VPN, 설치 문제, vpnui가 실행되지 않음

  9. 9

    Cisco Anyconnect VPN (Linux)이 시작되지 않습니다.

  10. 10

    Cisco Anyconnect VPN (Linux)이 시작되지 않습니다.

  11. 11

    Connect to Untrusted VPN Server using Cisco AnyConnect via command line in Windows

  12. 12

    Route Client Traffic Through VPN Tunnel

  13. 13

    Is it possible to route only a specific application through a VPN?

  14. 14

    Route Client Traffic Through VPN Tunnel

  15. 15

    only route certain addresses through PPTP VPN?

  16. 16

    Cisco AnyConnect VPN 클라이언트-회사 네트워크로 연결 방지

  17. 17

    Cisco Anyconnect VPN에 대한 경고음을 비활성화 하시겠습니까?

  18. 18

    Cisco Anyconnect VPN에 대한 경고음을 비활성화 하시겠습니까?

  19. 19

    VPN과 로컬 네트워크를 동시에 사용하도록 Cisco VPN Anyconnect 구성

  20. 20

    Error with Cisco VPN client driver

  21. 21

    Can Cisco Anywhere VPN monitor/log what devices on a wifi are accessing if one of those devices is on it?

  22. 22

    How to connect to VPN through Proxy Server

  23. 23

    add a route for VPN with NetworkManager

  24. 24

    Cisco AnyConnect Secure Mobility Client 3.1.03103. VPN 에이전트 서비스가 응답하지 않습니다

  25. 25

    VPN through NetworkManager in Debian?

  26. 26

    Cisco VPN Client hangs at "Opening cert store"

  27. 27

    Cisco VPN 클라이언트

  28. 28

    SSH 전용 Cisco VPN Connection?

  29. 29

    How to make WiFi work automatically?

뜨겁다태그

보관