Skip to content

Windows TAP driver (NDIS 6)

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
COPYING
GPL-2.0
COPYRIGHT.GPL
Notifications You must be signed in to change notification settings

nkwilson/tap-windows6

 
 

Repository files navigation

TAP-Windows driver (NDIS 6)

This is an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. NDIS 6 drivers can run on Windows Vista or higher.

Build

To build, the following prerequisites are required:

  • Python 2.7
  • Microsoft Windows 7 WDK (Windows Driver Kit)
  • Windows code signing certificate
  • Git (not strictly required, but useful for running commands using bundled bash shell)
  • MakeNSIS (optional)
  • Patched source code directory of devcon sample from WDK (optional)
  • Prebuilt tapinstall.exe binaries (optional)

Make sure you add Python's install directory (usually c:python27) to the PATH environment variable.

These instructions have been tested on Windows 7 using Git Bash, as well as on Windows 2012 Server using Git Bash and Windows Powershell.

View build script options:

$ python buildtap.py
Usage: buildtap.py [options]

Options:
  -h, --help         show this help message and exit
  -s SRC, --src=SRC  TAP-Windows top-level directory, default=<CWD>
  --ti=TAPINSTALL    tapinstall (i.e. devcon) directory (optional)
  -d, --debug        enable debug build
  -c, --clean        do an nmake clean before build
  -b, --build        build TAP-Windows and possibly tapinstall (add -c to
                     clean before build)
  -p, --package      generate an NSIS installer from the compiled files
  --cert=CERT        Common name of code signing certificate, default=openvpn
  --crosscert=CERT   The cross-certificate file to use, default=MSCV-
                     VSClass3.cer
  --timestamp=URL    Timestamp URL to use, default=http://timestamp.verisign.c
                     om/scripts/timstamp.dll
  -a, --oas          Build for OpenVPN Access Server clients

Edit version.m4 and paths.py as necessary then build:

$ python buildtap.py -b

On successful completion, all build products will be placed in the "dist" directory as well as tap6.tar.gz. The NSIS installer package will be placed to the build root directory.

Building tapinstall (optional)

The build system supports building tapinstall.exe (a.k.a. devcon.exe). However the devcon source code in WinDDK does not build without modifications which cannot be made public due to licensing restrictions. For these reasons the default behavior is to reuse pre-built executables. To make sure the buildsystem finds the executables create the following directory structure under tap-windows6 directory:

tapinstall └── 7600

├── objfre_wlh_amd64 │   └── amd64 │   └── tapinstall.exe └── objfre_wlh_x86

└── i386
└── tapinstall.exe

This structure is equal to what building tapinstall would create. Replace 7600 with the major number of your WinDDK version. Finally call buildtap.py with "--ti=tapinstall".

Please note that the NSIS packaging (-p) step will fail if you don't have tapinstall.exe available. Also don't use the "-c" flag or the above directories will get wiped before MakeNSIS is able to find them.

Install/Update/Remove

The driver can be installed using a command-line tool, tapinstall.exe, which is bundled with OpenVPN and tap-windows installers. Note that in some versions of OpenVPN tapinstall.exe is called devcon.exe. To install, update or remove the tap-windows NDIS 6 driver follow these steps:

  • place tapinstall.exe/devcon.exe to your PATH
  • open an Administrator shell
  • cd to dist
  • cd to amd64 or i386 depending on your system's processor architecture.

Install:

$ tapinstall install OemVista.inf TAP0901

Update:

$ tapinstall update OemVista.inf TAP0901

Remove:

$ tapinstall remove TAP0901

Notes on proxies

It is possible to build tap-windows6 without connectivity to the Internet but any attempt to timestamp the driver will fail. For this reason configure your outbound proxy server before starting the build. Note that the command prompt also needs to be restarted to make use of new proxy settings.

About

Windows TAP driver (NDIS 6)

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
COPYING
GPL-2.0
COPYRIGHT.GPL

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 87.0%
  • Python 5.6%
  • C++ 4.3%
  • NSIS 3.1%