Skip to content

Instantly share code, notes, and snippets.

@jasmas
Created January 26, 2022 17:29
Show Gist options
  • Star 24 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save jasmas/22a4b1b12676c36074a4999c68e6a482 to your computer and use it in GitHub Desktop.
Save jasmas/22a4b1b12676c36074a4999c68e6a482 to your computer and use it in GitHub Desktop.
Enable/Disable Cisco AnyConnect Socket Filter Extension on MacOS
#!/bin/sh
echo Disabling vpnagentd...
sudo launchctl disable system/com.cisco.anyconnect.vpnagentd
echo Tearing down vpnagentd...
sudo launchctl bootout system /Library/LaunchDaemons/com.cisco.anyconnect.vpnagentd.plist
echo Deactivating Cisco AnyConnect Socket Filter Extension...
/Applications/Cisco/Cisco\ AnyConnect\ Socket\ Filter.app/Contents/MacOS/Cisco\ AnyConnect\ Socket\ Filter -deactivateExt
#!/bin/sh
echo Enabling vpnagentd...
sudo launchctl enable system/com.cisco.anyconnect.vpnagentd
echo Bootstrapping vpnagentd...
sudo launchctl bootstrap system /Library/LaunchDaemons/com.cisco.anyconnect.vpnagentd.plist
@FDRcode44
Copy link

Thanks so much, @jasmas! I've found this content filter can altogether block an internet connection for some of us on Macs when working remotely. I've disabled this within network prefs, but sometimes the only thing that has worked has been to uninstall the filter from apps. I look forward to trying this script the next time it happens on a Mac.

Are you aware of a similar content filter on Windows?

@adifahmi
Copy link

adifahmi commented Aug 8, 2023

Thank you 🙏

@mixmixmix
Copy link

Thank you so much. Hopefully that allows to deactivate this junk permanently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment