Skip to content

Instantly share code, notes, and snippets.

@vre
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vre/9f34b89ccdabdb2062b4 to your computer and use it in GitHub Desktop.
Save vre/9f34b89ccdabdb2062b4 to your computer and use it in GitHub Desktop.
Cisco Anyconnect and Virtualbox don't go well together. The firewall blocks all traffic except what goes through the VPN. To allow traffic to virtualbox you need to run the following snippet on your OSX every time the VPN (re)connects. Yosemite not supported yet by this script.
#!/bin/bash
if [ `uname` != "Darwin" ]; then
echo "Run this on OS X "
exit 1
fi
# pre ask password
sudo -v
# Set firewall rules so connection to virtualbox functions for Maverics
sudo ipfw add 00002 allow all from any to any via vboxnet0
sudo ipfw add 00002 allow all from any to any via vboxnet1
sudo ipfw add 00002 allow all from any to any via vboxnet2
# For Yosemite same should be done with pf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment