Mac OS X agent VPN client incompatibility

Updated 3 weeks ago by admin

The Mac OS X agent uses a SOCKS proxy to intercept traffic from applications running on the Mac. Under Mac OS X, 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 X VPN adaptor to use the Mac OS X 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?