OpenVPN Windows releases include a Windows GUI, which is not part of the core project. OpenVPN versions 2.2.x and earlier include the old Windows GUI, whereas 2.3 and later include the new Windows GUI. These instruction cover building the new GUI, although instruction for the old one are probably very similar.

Building the OpenVPN installer bundle

Currently the easiest way to build OpenVPN-GUI is to build the entire OpenVPN Windows installer bundle and extract the produced OpenVPN-GUI binary. Thorough instructions are available here.

Building OpenVPN-GUI

This information is adapted from Selva's and David's emails to openvpn-devel mailing list.

Cross compiling on linux is possible. If the change-password feature is enabled (this is the default), openssl library built for the target (windows) is required. This may be cross-compiled from source or if you are building on Fedora, MinGW has a decent set of cross-compiled libraries available out of the box. The following assumes that the openssl library and include files are installed in $HOME/windows/.

These instructions have been tested on Debian Jessie with automake, mingw-w64 and dependencies installed.

Steps -- building for 64 bit windows

Starting from a clone of the gui repo from github, do

$ autoreconf -i -v

Run configure as

$ ./configure --prefix=/ --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu --program-prefix='' OPENSSL_CRYPTO_CFLAGS="-I $HOME/windows/include/" OPENSSL_CRYPTO_LIBS="-L $HOME/windows/lib/ -lcrypto"

Replace, $HOME/windows by the location of openssl include and libs. If disabling change-password is ok, run configure as

$ ./configure --prefix=/ --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu --program-prefix='' CFLAGS=-DDISABLE_CHANGE_PASSWORD OPENSSL_CRYPTO_LIBS="-L./" OPENSSL_CRYPTO_CFLAGS="-I./"

Then run make:

$ make

Optionally use -j n with make.

That will build openvpn-gui.exe. The exec can be installed manually by copying to the folder where other OpenVPN binaries are installed (C:\Program Files\OpenVPN\bin by default).

Last modified 5 months ago Last modified on 08/19/21 17:29:33

Attachments (1)

Download all attachments as: .zip