Build patched Windows openvpn Client


#
#
# Till now the scramble openvpn patch works.
# But read more about the controversy here
# https://tunnelblick.net/cOpenvpn_xorpatch.html#the-openvpn_xorpatch-controversy
#
# Patch sources
# https://github.com/Tunnelblick/Tunnelblick/tree/master/third_party/sources/openvpn
# https://github.com/clayface/openvpn_xorpatch
#
##########################################################
#
#
# for Openvpn 2.4.8 using tunnelblick patch for 32bit windows
# https://www.dropbox.com/s/z3zn3cvpzm01608/openvpn.exe?dl=0
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
# sha256sum = 6bd77984982d44bfabd95dfa434206d5bf659651ca392286e4984ee3401e2097
#
# for Openvpn 2.4.8 using tunnelblick patch for 64bit windows
# https://www.dropbox.com/s/gb7j94e7j0g4vi2/openvpn.exe?dl=0
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
# sha256sum = 757c5c21b0e17ccd3b1e8f2fb34b388cf92003e42b70a24112f7c0bf4365c6ed
#
# For older versions, see bottom of post.
# But Safest is to make your own patched server and client
#
##########################################################
# Building patched windows openvpn
# Using Ubuntu 16.04 64-bit server
# Built using a VPS by digitalocean 1GB Ram 25GB SSD Disk Ubuntu 16.04 x64 London
#
# My Guides
# https://community.openvpn.net/openvpn/wiki/SettingUpGenericBuildsystem
# https://community.openvpn.net/openvpn/wiki/BuildingUsingGenericBuildsystem
#
# And these are the commands to build the openvpn.exe from source code and patch

# Built on Ubuntu 16.04.4 x64

wget https://community.openvpn.net/openvpn/raw-attachment/wiki/SettingUpGenericBuildsystem/setup-generic-buildsystem.7.sh
chmod +x ./setup-generic-buildsystem.7.sh

# setup
./setup-generic-buildsystem.7.sh

# Now lets build it without patch
# This will fetch the source code for us.

cd openvpn-build/generic
IMAGEROOT=`pwd`/image-win32 CHOST=i686-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build

# We don’t want this compiled version, so delete it
rm -rf image-*

# get the patch
# when patch is updated, these links wont work, check latest at
# https://github.com/Tunnelblick/Tunnelblick/tree/master/third_party/sources/openvpn
#

cd ~/openvpn-build/generic/patches
wget https://raw.githubusercontent.com/Tunnelblick/Tunnelblick/master/third_party/sources/openvpn/openvpn-2.4.8/patches/02-tunnelblick-openvpn_xorpatch-a.diff
wget https://raw.githubusercontent.com/Tunnelblick/Tunnelblick/master/third_party/sources/openvpn/openvpn-2.4.8/patches/03-tunnelblick-openvpn_xorpatch-b.diff
wget https://raw.githubusercontent.com/Tunnelblick/Tunnelblick/master/third_party/sources/openvpn/openvpn-2.4.8/patches/04-tunnelblick-openvpn_xorpatch-c.diff
wget https://raw.githubusercontent.com/Tunnelblick/Tunnelblick/master/third_party/sources/openvpn/openvpn-2.4.8/patches/05-tunnelblick-openvpn_xorpatch-d.diff
wget https://raw.githubusercontent.com/Tunnelblick/Tunnelblick/master/third_party/sources/openvpn/openvpn-2.4.8/patches/06-tunnelblick-openvpn_xorpatch-e.diff

# We apply patch the long way
cd $HOME/openvpn-build/generic/sources
tar xfz ./openvpn-2.4.8.tar.gz
rm openvpn-2.4.8.tar.gz
cp ~/openvpn-build/generic/patches/02-tunnelblick-openvpn_xorpatch-a.diff ~/openvpn-build/generic/sources/openvpn-2.4.8
cp ~/openvpn-build/generic/patches/03-tunnelblick-openvpn_xorpatch-b.diff ~/openvpn-build/generic/sources/openvpn-2.4.8
cp ~/openvpn-build/generic/patches/04-tunnelblick-openvpn_xorpatch-c.diff ~/openvpn-build/generic/sources/openvpn-2.4.8
cp ~/openvpn-build/generic/patches/05-tunnelblick-openvpn_xorpatch-d.diff ~/openvpn-build/generic/sources/openvpn-2.4.8
cp ~/openvpn-build/generic/patches/06-tunnelblick-openvpn_xorpatch-e.diff ~/openvpn-build/generic/sources/openvpn-2.4.8
cd ~/openvpn-build/generic/sources/openvpn-2.4.8
git apply –check 02-tunnelblick-openvpn_xorpatch-a.diff
git apply –check 03-tunnelblick-openvpn_xorpatch-b.diff
git apply –check 04-tunnelblick-openvpn_xorpatch-c.diff
git apply –check 05-tunnelblick-openvpn_xorpatch-d.diff
git apply –check 06-tunnelblick-openvpn_xorpatch-e.diff
git apply 02-tunnelblick-openvpn_xorpatch-a.diff
git apply 03-tunnelblick-openvpn_xorpatch-b.diff
git apply 04-tunnelblick-openvpn_xorpatch-c.diff
git apply 05-tunnelblick-openvpn_xorpatch-d.diff
git apply 06-tunnelblick-openvpn_xorpatch-e.diff
cd ~/openvpn-build/generic/sources
tar cfz ./openvpn-2.4.8.tar.gz ./openvpn-2.4.8
rm -rf ./openvpn-2.4.8
# Now lets build it
cd ~/openvpn-build/generic/

# build for openvpn 32 bit
IMAGEROOT=`pwd`/image-win32 CHOST=i686-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build

# build for openvpn 64 bit
IMAGEROOT=`pwd`/image-win64 CHOST=x86_64-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build

# Check we have openvpn.exe
ls $HOME/openvpn-build/generic/image-win32/openvpn/bin
ls $HOME/openvpn-build/generic/image-win64/openvpn/bin

# Use Winscp, copy openvpn.exe from ubuntu server
# to windows c\:
# Then in windows, copy over to openvpn bin directory

#
# Guide: Building OpenVPN and it’s dependencies
#
# The ”./build” command fetches all the dependencies, builds them and builds OpenVPN.
# To build a native binary:
# IMAGEROOT=`pwd`/image-native ./build
#
# To build for Windows 32bit on Linux 64bit:
# IMAGEROOT=`pwd`/image-win32 CHOST=i686-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build
#
# To build for Windows 64bit on Linux 64bit:
# IMAGEROOT=`pwd`/image-win64 CHOST=x86_64-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build
#
# To build for Arm on Linux 64bit:
# IMAGEROOT=`pwd`/image-arm CHOST=arm-linux-gnueabi CBUILD=x86_64-pc-linux-gnu ./build
#####################################################################
#
# old Patched openvpn for earlier versions
#
# for Openvpn 2.4.7 using tunnelblick patch for 32bit windows
# https://www.dropbox.com/s/i707cfzoq1pfudt/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.7 using tunnelblick patch for 64bit windows
# https://www.dropbox.com/s/sg7ga6j8dd56uah/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.6 using tunnelblick patch for 32bit windows
# https://www.dropbox.com/s/qzjkcb90cwu141i/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.6 using tunnelblick patch for 64bit windows
# https://www.dropbox.com/s/ae0yp7fdwmil166/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.1 using tunnelblick patch for 32bit windows
# https://www.dropbox.com/s/i3qmr712d8bnqiz/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.1 using tunnelblick patch for 64bit windows
# https://www.dropbox.com/s/0fie1kr5gppqjfy/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.0 using tunnelblick patch 32bit
# https://www.dropbox.com/s/z3ox14scp18koao/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.4.0 using tunnelblick patch 64bit
# https://www.dropbox.com/s/hh986ugknpnkxsg/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.3.10 clayface patch 32bit
# https://www.dropbox.com/s/sw2rqr0g50tvw9f/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files (x86)\OpenVPN\bin
#
# for Openvpn 2.3.10 clayface patch 64bit
# https://www.dropbox.com/s/ivn5xsni15cucjy/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.3.10 tunnelblick patch 32bit
# https://www.dropbox.com/s/qagttkh0zna7hyl/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files (x86)\OpenVPN\bin
#
# for Openvpn 2.3.10 tunnelblick patch 64bit
# https://www.dropbox.com/s/r2xrlqqe040k4cp/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.3.6 32bit
# https://www.dropbox.com/s/nxzv3d0tfcs331m/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files (x86)\OpenVPN\bin
#
# for Openvpn 2.3.6 64bit
# https://www.dropbox.com/s/benu8o3n2jck7ni/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.3.5 32bit
# https://www.dropbox.com/s/gbpwf2lafhbd1e3/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files (x86)\OpenVPN\bin
#
# for Openvpn 2.3.5 64bit
# https://www.dropbox.com/s/is3c7g9l5hh6guh/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.3.4 32bit
# https://www.dropbox.com/s/l01si68evyfxqar/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files (x86)\OpenVPN\bin
#
# for Openvpn 2.3.4 64bit
# https://www.dropbox.com/s/4jhdgnvgs2c29d6/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.3.2 32bit
# https://www.dropbox.com/sh/7i36q61cbahonup/fK4ItfTreB/openvpn.exe
# Replace the openvpn.exe file in openvpn/bin
#
# for Openvpn 2.3.2 64bit
# https://www.dropbox.com/s/01s0vq98oxlhim2/openvpn.exe
# Replace the openvpn.exe file in C:\Program Files\OpenVPN\bin
#
# for Openvpn 2.2.2
# http://www.obfsvpn.com/openvpn.7z
# unzip and Replace the openvpn.exe file in the openvpn/bin directory
# Usually C:\Program Files (x86)\OpenVPN\bin
#

This entry was posted in Uncategorized. Bookmark the permalink.

14 Responses to Build patched Windows openvpn Client

  1. Gerry says:

    Would you please consider creating a tutorial for compiling an Android client that can connect to the RaspberryPI Scrambled OpenVPN server? Perhaps using OpenVPN-ICS available at https://code.google.com/p/ics-openvpn/ Thank you!

  2. Tony says:

    Thanks for providing updated binaries when there are new versions of OpenVPN!

  3. Tony says:

    Hi, can you please build updated Windows binaries with the patch? Setting up a Windows build env is a bit difficult. Also, could you apply the patch from tunnelblick (as you linked) as they stated the original patches had some issues.

    Thanks!

  4. modfiles says:

    hi
    how can i use the option –disable-plugin-auth-pam in ./configure using setup-generic-buildsystem.5.sh?
    im trying to compile for arm using this command
    IMAGEROOT=’pwd’/image-arm CHOST=arm-linux-gnueabi CBUILD=x86_64-pc-linux-gnu ./build
    but i always get
    configure: error: libpam required but missing
    i tried fixing it by doing apt-get install libpam0g-dev but to no avail
    i have read some post that if i get error compiling for arm related to libpam, just use the option –disable-plugin-auth-pam in configure but i have no idea how to do that in generic-buildsystem.5.sh
    your help will be greatly appreciated

  5. oraz says:

    Hi, where I can download the openvpn with scramble patch for windows client?

  6. asd says:

    The link of the last openvpn with xor patch applied is here:

    OpenVPN v.2.4.12 Xor
    https://www.4shared.com/s/fW3siIUtIfa

    OpenVPN v.2.5.9
    https://www.4shared.com/s/fYI3ESx50ge

    OpenVPN v.2.6.3
    https://www.4shared.com/s/fBQwbE_rXfa

    OpenVPN v.2.6.4
    https://www.4shared.com/s/fnJ3jMhuZge

Leave a comment