Skip to content

Instantly share code, notes, and snippets.

@genoma
Last active June 21, 2022 16:43
Show Gist options
  • Save genoma/b7148e5c96a19de8850d78562612b53d to your computer and use it in GitHub Desktop.
Save genoma/b7148e5c96a19de8850d78562612b53d to your computer and use it in GitHub Desktop.
Build OpenVPN on MacOSX

Basic steps to compile OpenVPN with LibreSSL or OpenSSL

Clone the OpenVPN repository (master or checkout a TAG to build stable release)

$ git clone https://github.com/OpenVPN/openvpn.git

Install dependencies with HOMEBREW

$ brew install automake autoconf libtool pkg-config libressl openssl lzo lz4

USE THE FOLLOWING FILE TO COMPILE OPENVPN

Just in case: to make the sh file executable you need to use: $ chmod +x {filename}

#!/bin/sh
cd ~/openvpn
make clean
autoreconf -i -v -f
# Libressl
./configure --disable-debug --disable-dependency-tracking --disable-silent-rules --with-crypto-library=openssl OPENSSL_LIBS="-L/usr/local/opt/libressl/lib -lssl -lcrypto" OPENSSL_CFLAGS="-I/usr/local/opt/libressl/include"
# Openssl
# ./configure --disable-debug --disable-dependency-tracking --disable-silent-rules --with-crypto-library=openssl OPENSSL_LIBS="-L/usr/local/opt/openssl/lib -lssl -lcrypto" OPENSSL_CFLAGS="-I/usr/local/opt/openssl/include"
make -j4
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment