OpenVPN on Mac OS X

If you need OpenVPN on your Mac, and you don’t want to pay for OpenVPN applications, you can compile everything for your own.

1. Get OpenVPN for OS X

You can download OpenVPN, for free, from page:

2. Get LZO library

Download LZO sources from

3. Get tuntap for OS X

Download installation/sources from

You can also build tuntap from the source code

git clone git://

4. Compile LZO

Create place for building all the stuff and build LZO (make sure to install XCode before you proceed). XCode can be downloaded here: XCode

If you want to execute anything in terminal, you have two choices: use built-in Terminal app (Applications -> Utilities -> Terminal) or download and install iTerm2 (that’s my preferred terminal application). You can download iTerm2 from here:

mkdir -p ~/opt/lzo
./configure --prefix=$HOME/opt/lzo
make install

5. Compile OpenVPN

mkdir -p ~/opt/openvpn

export CFLAGS="-I/Applications/\
export LDFLAGS="-L$HOME/opt/lzo/lib/"

./configure --prefix=$HOME/opt/openvpn

make install

6. Load yuntap extentions and run OpenVPN with configuration provided by your sys admin.

sudo kextload /Library/Extensions/tap.kext
sudo kextload /Library/Extensions/tun.kext
sudo openvpn config.ovpn