Skip to content

Instantly share code, notes, and snippets.

@superdaigo
Created September 14, 2012 05:34
Show Gist options
  • Save superdaigo/3719990 to your computer and use it in GitHub Desktop.
Save superdaigo/3719990 to your computer and use it in GitHub Desktop.
Homebrew OpenVPN
$ brew install openvpn
==> Installing openvpn dependency: lzo
==> Downloading http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/lzo/2.06 --enable-shared
==> make
==> make check
==> make install
/usr/local/Cellar/lzo/2.06: 27 files, 552K, built in 27 seconds
==> Installing openvpn
==> Downloading http://build.openvpn.net/downloads/releases/openvpn-2.2.2.tar.gz
######################################################################## 100.0%
==> Patching
patching file socket.c
==> ./configure --prefix=/usr/local/Cellar/openvpn/2.2.2
==> make install
Warning: inreplace: replacement of '/var/run/openvpn' with '/usr/local/var/run/openvpn' failed
==> Caveats
You may also wish to install tuntap:
The TunTap project provides kernel extensions for Mac OS X that allow
creation of virtual network interfaces.
http://tuntaposx.sourceforge.net/
Because these are kernel extensions, there is no Homebrew formula for tuntap.
For OpenVPN to work as a server, you will need to do the following:
1) Create configuration file in /usr/local/etc/openvpn, samples can be
found in /usr/local/Cellar/openvpn/2.2.2/share/doc/openvpn
2) Install the launchd item in /Library/LaunchDaemons, like so:
sudo cp -vf /usr/local/Cellar/openvpn/2.2.2/homebrew.mxcl.openvpn.plist /Library/LaunchDaemons/.
sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist
3) Start the daemon using:
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist
Next boot of system will automatically start OpenVPN.
==> Summary
/usr/local/Cellar/openvpn/2.2.2: 43 files, 1016K, built in 22 seconds
Copy link

ghost commented May 12, 2019

sudo cp -vf /usr/local/Cellar/openvpn/2.2.2/homebrew.mxcl.openvpn.plist /Library/LaunchDaemons/.
sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist

Doesn't work with the following Errors Displayed:

chown: /Library/LaunchDaemons/homebrew.mxcl.openvpn.plist: No such file or directory

cp: /usr/local/Cellar/openvpn/2.2.2/homebrew.mxcl.openvpn.plist: No such file or directory

Copy link

ghost commented May 13, 2019

Ok i figured out the last commands the openvpn was update and in a new /2.#.#/ folder

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