mac OS agent VPN client incompatibility

Updated 1 month ago by admin

The mac OS agent uses a SOCKS proxy to intercept traffic from applications running on the Mac. Under mac OS, a VPN network adaptor is able to tunnel the traffic and therefore bypass the SOCKS proxy even if it is set globally in network preferences. The following VPN applications are known to cause this behaviour:

  • Cisco AnyConnect
  • Bitdefender VPN
  • FortiClient SSL VPN

Setting the SOCKS proxy manually for a VPN connection

It is possible to configure the mac OS VPN adaptor to use the SOCKS proxy manually. This requires elevated permissions.

To locate the name of your VPN adaptor, run:

networksetup -listnetworkserviceorder

Once you have found the name of the adaptor, e.g. "VPN Connection":

sudo networksetup -setsocksfirewallproxystate "VPN Connection" on
sudo networksetup -setsocksfirewallproxy "VPN Connection" localhost 42339
A browser restart is required afterwards.

To remove the configuration:

sudo networksetup -setsocksfirewallproxy "VPN Connection" "" ""
sudo networksetup -setsocksfirewallproxystate "VPN Connection" off

How did we do?