Openvpn server скачать windows 10

The OpenVPN community project team is proud to release OpenVPN 2.6.6. This is a small bugfix release.

For details see Changes.rst

User visible changes:

  • OCC exit messages are now logged more visibly See GH #391.
  • OpenSSL error messages are now logged with more details (for example, when loading a provider fails, which .so was tried, and why did it fail) See GH #361.
  • print a more user-friendly message when tls-crypt-v2 client auth fails
  • packaging now includes all documentation in the source tarball

New features:

  • set WINS server via interactive service — this adds support for «dhcp-option WINS 192.0.2.1» for DCO + wintun interfaces where no DHCP server is used. See GH #373.

Windows MSI changes since 2.6.5:

  • Included openvpn-gui updated to 11.44.0.0
  • MSIs now use OpenSSL 3.1.2

For Community-maintained packages for Linux distributions see OpenvpnSoftwareRepos

Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.6.6-I001-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.6.6-I001-arm64.msi
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.6.6-I001-x86.msi
Source archive file
GnuPG Signature openvpn-2.6.6.tar.gz

The OpenVPN community project team is proud to release OpenVPN 2.6.4. This is a small bugfix release.

For details see Changes.rst

Note:

  • License amendment: all new commits fall under a modified license that explicitly permits linking with Apache2 libraries (mbedTLS, OpenSSL) — see COPYING for details. Existing code will fall under the new license as soon as all contributors have agreed to the change — work ongoing.

Feature changes:

  • DCO: support kernel-triggered key rotation (avoid IV reuse after 232 packets). This is the userland side, accepting a message from kernel, and initiating a TLS renegotiation. As of 2.6.4 release, only implemented in FreeBSD kernel.

Windows MSI changes since 2.6.3:

  • Rebuilt included tap-windows driver with the correct version of the old Windows 7 driver, removing a warning about unsigned driver on Windows 7 installation. See GH openvpn-build#365.
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.6.4-I001-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.6.4-I001-arm64.msi
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.6.4-I001-x86.msi
Source archive file
GnuPG Signature openvpn-2.6.4.tar.gz

The OpenVPN community project team is proud to release OpenVPN 2.6.3. This is a small bugfix release.

For details see Changes.rst

Feature changes:

  • Windows: support setting DNS domain in configurations without GUI and DHCP (typically wintun or windco drivers), see GH openvpn#306.

Windows MSI changes since 2.6.2:

  • Several Windows-specific issues fixed:
    • ensure interactive service stays enabled after silent reinstall, see GH openvpn-build#348, openvpn-build#349 and openvpn-build#351
    • repair querying install path info for easyrsa-start.bat on some Windows language versions, see GH openvpn-build#352.
  • MSIs are now built against OpenSSL 3.1.0.
  • Update included openvpn-gui to 11.41.0.0
    • This update removes the ability to change the password of a private key from the GUI. This was a niche feature which caused a direct dependency of GUI on OpenSSL. Use openssl.exe directly if you need to edit a private key.

Note: Windows MSI was updated to I003 on April 26th. Changes in I003:

  • The GPG subkey for creating the .asc files for the downloads has been updated. You might need to re-download or update the GPG key if verifying the signatures.
  • Fix the encoding of some documentation/sample files included in the installer. See GH openvpn-build#358
  • Update include tap-windows6 driver to 9.25.0
    • Fixes a problem with sending small non-IP packets (e.g. PPPoE) over the VPN connection. See GH tap-windows6#158
    • Note: The new driver is only used on Windows 10 and newer. We can’t rebuild drivers for Windows 7/8 since Microsoft doesn’t support the signing mechanism anymore. We include the previous driver version to still allow installation on Windows 7/8.
  • Update included openvpn-gui to 11.42.0.0
    • Fixes a problem with passphrase prompt was sometimes not displayed. See GH openvpn-gui#619
    • Adds «Password Reveal» feature which allows you to see passwords while entering them.
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.6.3-I003-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.6.3-I003-arm64.msi
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.6.3-I003-x86.msi
Source archive file
GnuPG Signature openvpn-2.6.3.tar.gz

The OpenVPN community project team is proud to release OpenVPN 2.6.2. This is mostly a bugfix release with some improvements.

For details see Changes.rst

Feature changes:

  • implement byte counter statistics for DCO Linux (p2mp server and client)
  • implement byte counter statistics for DCO Windows (client only)
  • --dns server <n> address ... now permits up to 8 v4 or v6 addresses

Important note for Linux DCO users:

  • New control packets flow for data channel offloading on Linux: 2.6.2+ changes the way OpenVPN control packets are handled on Linux when DCO is active, fixing the lockups observed with 2.6.0/2.6.1 under high client connect/disconnect activity. This is an INCOMPATIBLE change and therefore an ovpn-dco kernel module older than v0.2.20230323 (commit ID 726fdfe0fa21) will not work anymore and must be upgraded. The kernel module was renamed to «ovpn-dco-v2.ko» in order to highlight this change and ensure that users and userspace software could easily understand which version is loaded. Attempting to use the old ovpn-dco with 2.6.2+ will lead to disabling DCO at runtime.

Windows MSI changes since 2.6.1:

  • Update included openvpn-gui to 11.39.0.0
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.6.2-I001-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.6.2-I001-arm64.msi
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.6.2-I001-x86.msi
Source archive file
GnuPG Signature openvpn-2.6.2.tar.gz

The OpenVPN community project team is proud to release OpenVPN 2.6.1. This is mostly a bugfix release with some improvements.

For details see Changes.rst

Feature changes:

  • Dynamic TLS Crypt: When both peers are OpenVPN 2.6.1+, OpenVPN will dynamically create a tls-crypt key that is used for renegotiation. This ensure that only the previously authenticated peer can do trigger renegotiation and complete renegotiations.
  • CryptoAPI (Windows): support issuer name as a selector. Certificate selection string can now specify a partial issuer name string as
    «—cryptoapicert ISSUER:<string>» where <string> is matched as a substring of the issuer (CA) name in the certificate.

Note: configure now enables DCO build by default on FreeBSD and Linux. On Linux this brings in a new default dependency for libnl-genl (for Linux distributions that are too old to have a suitable version of the library, use «configure —disable-dco»)

Windows MSI changes since 2.6.1:

  • Update included ovpn-dco-win driver to 0.9.2
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.6.1-I001-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.6.1-I001-arm64.msi
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.6.1-I001-x86.msi
Source archive file
GnuPG Signature openvpn-2.6.1.tar.gz

The OpenVPN community project team is proud to release OpenVPN 2.6.0. This is a new stable release with some major new features.

For details see: Changes.rst

The Changes document also contains a section with workarounds for common problems encountered when using OpenVPN with OpenSSL 3.

New features and improvements in 2.6.0 compared to 2.5.8:

  • Data Channel Offload (DCO) kernel acceleration support for Windows, Linux, and FreeBSD.
  • OpenSSL 3 support.
  • Improved handling of tunnel MTU, including support for pushable MTU.
  • Outdated cryptographic algorithms disabled by default, but there are options to override if necessary.
  • Reworked TLS handshake, making OpenVPN immune to replay-packet state exhaustion attacks.
  • Added —peer-fingerprint mode for a more simplistic certificate setup and verification.
  • Added Pre-Logon Access Provider support to OpenVPN GUI for Windows.
  • Improved protocol negotiation, leading to faster connection setup.
  • Included openvpn-gui updated to 11.37.0.0. See CHANGES.rst.
  • Updated easy-rsa3 bundled with the installer on Windows.
  • Various bug fixes.
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.6.0-I005-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.6.0-I005-arm64.msi
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.6.0-I005-x86.msi
Source archive file
GnuPG Signature openvpn-2.6.0.tar.gz

The OpenVPN community project team is proud to release OpenVPN 2.5.4. This release include a number of fixes and small improvements. One of the fixes is to password prompting on windows console when stderr redirection is in use — this breaks 2.5.x on Win11/ARM, and might also break on Win11/amd64. Windows executable and libraries are now built natively on Windows using MSVC, not cross-compiled on Linux as with earlier 2.5 releases. Windows installers include updated OpenSSL and new OpenVPN GUI. The latter includes several improvements, the most important of which is the ability to import profiles from URLs where available. Installer version I602 fixes loading of pkcs11 files on Windows. Installer version I603 fixes a bug in the version number as seen by Windows (was 2.5..4, not 2.5.4). Installer I604 fixes some small Windows issues.

Source tarball (gzip)
GnuPG Signature openvpn-2.5.4.tar.gz
Source tarball (xz)
GnuPG Signature openvpn-2.5.4.tar.xz
Source zip
GnuPG Signature openvpn-2.5.4.zip
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.5.4-I604-x86.msi
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.5.4-I604-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.5.4-I604-arm64.msi

Overview of changes since OpenVPN 2.4

Faster connections

Crypto specific changes

  • ChaCha20-Poly1305 cipher in the OpenVPN data channel (Requires OpenSSL 1.1.0 or newer)
  • Improved TLS 1.3 support when using OpenSSL 1.1.1 or newer
  • Client-specific tls-crypt keys (—tls-crypt-v2)
  • Improved Data channel cipher negotiation
  • Removal of BF-CBC support in default configuration (see below for possible incompatibilities)

Server-side improvements

  • HMAC based auth-token support for seamless reconnects to standalone servers or a group of servers.
  • Asynchronous (deferred) authentication support for auth-pam plugin
  • Asynchronous (deferred) support for client-connect scripts and plugins

Network-related changes

  • Support IPv4 configs with /31 netmasks now
  • 802.1q VLAN support on TAP servers
  • IPv6-only tunnels
  • New option —block-ipv6 to reject all IPv6 packets (ICMPv6)

Linux-specific features

  • VRF support
  • Netlink integration (OpenVPN no longer needs to execute ifconfig/route or ip commands)

Windows-specific features

  • Wintun driver support, a faster alternative to tap-windows6
  • Setting tun/tap interface MTU
  • Setting DHCP search domain
  • Allow unicode search string in —cryptoapicert option
  • EasyRSA3, a modern take on OpenVPN CA management
  • MSI installer

Important notices

BF-CBC cipher is no longer the default

Cipher handling for the data channel cipher has been significantly changed between OpenVPN 2.3/2.4 and v2.5, most notably there are no «default cipher BF-CBC» anymore because it is no longer considered a reasonable default. BF-CBC is still available, but it needs to be explicitly configured now.

For connections between OpenVPN 2.4 and v2.5 clients and servers, both ends will be able  to negotiate a better cipher than BF-CBC. By default they will select one of the AES-GCM ciphers, but this can be influenced using the —data-ciphers setting.

Connections between OpenVPN 2.3 and v2.5 that have no —cipher setting in the config (= defaulting to BF-CBC and not being negotiation-capable) must be updated. Unless BF-CBC is included in —data-ciphers or there is a «—cipher BF-CBC» in the OpenVPN 2.5 config, a v2.5 client or server will refuse to talk to a v2.3 server or client, because it has no common data channel cipher and negotiating a cipher is not possible. Generally, we recommend upgrading such setups to OpenVPN 2.4 or v2.5. If upgrading is not possible we recommend adding data-ciphers AES-256-GCM:AES-128-GCM:AES-128-CBC (for v2.5+) or cipher AES-128-CBC (v2.4.x and older) to the configuration of all clients and servers.

If you really need to use an unsupported OpenVPN 2.3 (or even older) release and need to stay on BF-CBC (not recommended), the OpenVPN 2.5 based client will need a config file change to re-enable BF-CBC.  But be warned that BF-CBC and other related weak ciphers will be removed in coming OpenVPN major releases.

Connectivity to some VPN service provider may break

Connecting with an OpenVPN 2.5 client to at least one commercial VPN service that

implemented their own cipher negotiation method that always reports back that it is using BF-CBC to the client is broken in v2.5. This has always caused warning about mismatch ciphers. We have been in contact with some service providers and they are looking into it.  This is not something the OpenVPN community can fix.  If your commercial VPN does not work with a v2.5 client, complain to the VPN service provider.

More details on these new features as well as a list of deprecated features and user-visible changes are available in Changes.rst.

The OpenVPN community project team is proud to release OpenVPN 2.5.3. Besides a number of small improvements and bug fixes, this release fixes a possible security issue with OpenSSL config autoloading on Windows (CVE-2021-3606). Updated OpenVPN GUI is also included in Windows installers.

Source tarball (gzip)
GnuPG Signature openvpn-2.5.3.tar.gz
Source tarball (xz)
GnuPG Signature openvpn-2.5.3.tar.xz
Source zip
GnuPG Signature openvpn-2.5.3.zip
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.5.3-I601-x86.msi
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.5.3-I601-amd64.msi
Windows ARM64 MSI installer
GnuPG Signature OpenVPN-2.5.3-I601-arm64.msi

Overview of changes since OpenVPN 2.4

Faster connections

  • Connections setup is now much faster

Crypto specific changes

  • ChaCha20-Poly1305 cipher in the OpenVPN data channel (Requires OpenSSL 1.1.0 or newer)
  • Improved TLS 1.3 support when using OpenSSL 1.1.1 or newer
  • Client-specific tls-crypt keys (—tls-crypt-v2)
  • Improved Data channel cipher negotiation
  • Removal of BF-CBC support in default configuration (see below for possible incompatibilities)

Server-side improvements

  • HMAC based auth-token support for seamless reconnects to standalone servers or a group of servers.
  • Asynchronous (deferred) authentication support for auth-pam plugin
  • Asynchronous (deferred) support for client-connect scripts and plugins

Network-related changes

  • Support IPv4 configs with /31 netmasks now
  • 802.1q VLAN support on TAP servers
  • IPv6-only tunnels
  • New option —block-ipv6 to reject all IPv6 packets (ICMPv6)

Linux-specific features

  • VRF support
  • Netlink integration (OpenVPN no longer needs to execute ifconfig/route or ip commands)

Windows-specific features

  • Wintun driver support, a faster alternative to tap-windows6
  • Setting tun/tap interface MTU
  • Setting DHCP search domain
  • Allow unicode search string in —cryptoapicert option
  • EasyRSA3, a modern take on OpenVPN CA management
  • MSI installer

Important notices

BF-CBC cipher is no longer the default

Cipher handling for the data channel cipher has been significantly changed between OpenVPN 2.3/2.4 and v2.5, most notably there are no «default cipher BF-CBC» anymore because it is no longer considered a reasonable default. BF-CBC is still available, but it needs to be explicitly configured now.

For connections between OpenVPN 2.4 and v2.5 clients and servers, both ends will be able  to negotiate a better cipher than BF-CBC. By default they will select one of the AES-GCM ciphers, but this can be influenced using the —data-ciphers setting.

Connections between OpenVPN 2.3 and v2.5 that have no —cipher setting in the config (= defaulting to BF-CBC and not being negotiation-capable) must be updated. Unless BF-CBC is included in —data-ciphers or there is a «—cipher BF-CBC» in the OpenVPN 2.5 config, a v2.5 client or server will refuse to talk to a v2.3 server or client, because it has no common data channel cipher and negotiating a cipher is not possible. Generally, we recommend upgrading such setups to OpenVPN 2.4 or v2.5. If upgrading is not possible we recommend adding data-ciphers AES-256-GCM:AES-128-GCM:AES-128-CBC (for v2.5+) or cipher AES-128-CBC (v2.4.x and older) to the configuration of all clients and servers.

If you really need to use an unsupported OpenVPN 2.3 (or even older) release and need to stay on BF-CBC (not recommended), the OpenVPN 2.5 based client will need a config file change to re-enable BF-CBC.  But be warned that BF-CBC and other related weak ciphers will be removed in coming OpenVPN major releases.

Connectivity to some VPN service provider may break

Connecting with an OpenVPN 2.5 client to at least one commercial VPN service that

implemented their own cipher negotiation method that always reports back that it is using BF-CBC to the client is broken in v2.5. This has always caused warning about mismatch ciphers. We have been in contact with some service providers and they are looking into it.  This is not something the OpenVPN community can fix.  If your commercial VPN does not work with a v2.5 client, complain to the VPN service provider.

More details on these new features as well as a list of deprecated features and user-visible changes are available in Changes.rst.

The OpenVPN community project team is proud to release OpenVPN 2.5.2. It fixes two related security vulnerabilities (CVE-2020-15078) which under very specific circumstances allow tricking a server using delayed authentication (plugin or management) into returning a PUSH_REPLY before the AUTH_FAILED message, which can possibly be used to gather information about a VPN setup. In combination with «—auth-gen-token» or a user-specific token auth solution it can be possible to get access to a VPN with an otherwise-invalid account. OpenVPN 2.5.2 also includes other bug fixes and improvements. Updated OpenSSL and OpenVPN GUI are included in Windows installers.

Source tarball (gzip)
GnuPG Signature openvpn-2.5.2.tar.gz
Source tarball (xz)
GnuPG Signature openvpn-2.5.2.tar.xz
Source zip
GnuPG Signature openvpn-2.5.2.zip
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.5.2-I601-x86.msi
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.5.2-I601-amd64.msi

Overview of changes since OpenVPN 2.4

Faster connections

  • Connections setup is now much faster

Crypto specific changes

  • ChaCha20-Poly1305 cipher in the OpenVPN data channel (Requires OpenSSL 1.1.0 or newer)
  • Improved TLS 1.3 support when using OpenSSL 1.1.1 or newer
  • Client-specific tls-crypt keys (—tls-crypt-v2)
  • Improved Data channel cipher negotiation
  • Removal of BF-CBC support in default configuration (see below for possible incompatibilities)

Server-side improvements

  • HMAC based auth-token support for seamless reconnects to standalone servers or a group of servers.
  • Asynchronous (deferred) authentication support for auth-pam plugin
  • Asynchronous (deferred) support for client-connect scripts and plugins

Network-related changes

  • Support IPv4 configs with /31 netmasks now
  • 802.1q VLAN support on TAP servers
  • IPv6-only tunnels
  • New option —block-ipv6 to reject all IPv6 packets (ICMPv6)

Linux-specific features

  • VRF support
  • Netlink integration (OpenVPN no longer needs to execute ifconfig/route or ip commands)

Windows-specific features

  • Wintun driver support, a faster alternative to tap-windows6
  • Setting tun/tap interface MTU
  • Setting DHCP search domain
  • Allow unicode search string in —cryptoapicert option
  • EasyRSA3, a modern take on OpenVPN CA management
  • MSI installer

Important notices

BF-CBC cipher is no longer the default

Cipher handling for the data channel cipher has been significantly changed between OpenVPN 2.3/2.4 and v2.5, most notably there are no «default cipher BF-CBC» anymore because it is no longer considered a reasonable default. BF-CBC is still available, but it needs to be explicitly configured now.

For connections between OpenVPN 2.4 and v2.5 clients and servers, both ends will be able  to negotiate a better cipher than BF-CBC. By default they will select one of the AES-GCM ciphers, but this can be influenced using the —data-ciphers setting.

Connections between OpenVPN 2.3 and v2.5 that have no —cipher setting in the config (= defaulting to BF-CBC and not being negotiation-capable) must be updated. Unless BF-CBC is included in —data-ciphers or there is a «—cipher BF-CBC» in the OpenVPN 2.5 config, a v2.5 client or server will refuse to talk to a v2.3 server or client, because it has no common data channel cipher and negotiating a cipher is not possible. Generally, we recommend upgrading such setups to OpenVPN 2.4 or v2.5. If upgrading is not possible we recommend adding data-ciphers AES-256-GCM:AES-128-GCM:AES-128-CBC (for v2.5+) or cipher AES-128-CBC (v2.4.x and older) to the configuration of all clients and servers.

If you really need to use an unsupported OpenVPN 2.3 (or even older) release and need to stay on BF-CBC (not recommended), the OpenVPN 2.5 based client will need a config file change to re-enable BF-CBC.  But be warned that BF-CBC and other related weak ciphers will be removed in coming OpenVPN major releases.

Connectivity to some VPN service provider may break

Connecting with an OpenVPN 2.5 client to at least one commercial VPN service that

implemented their own cipher negotiation method that always reports back that it is using BF-CBC to the client is broken in v2.5. This has always caused warning about mismatch ciphers. We have been in contact with some service providers and they are looking into it.  This is not something the OpenVPN community can fix.  If your commercial VPN does not work with a v2.5 client, complain to the VPN service provider.

More details on these new features as well as a list of deprecated features and user-visible changes are available in Changes.rst.

The OpenVPN community project team is proud to release OpenVPN 2.5.1. It includes several bug fixes and improvements as well as updated OpenSSL and OpenVPN GUI for Windows.

Source tarball (gzip)
GnuPG Signature openvpn-2.5.1.tar.gz
Source tarball (xz)
GnuPG Signature openvpn-2.5.1.tar.xz
Source zip
GnuPG Signature openvpn-2.5.1.zip
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.5.1-I601-x86.msi
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.5.1-I601-amd64.msi

Overview of changes since OpenVPN 2.4

Faster connections

  • Connections setup is now much faster

Crypto specific changes

  • ChaCha20-Poly1305 cipher in the OpenVPN data channel (Requires OpenSSL 1.1.0 or newer)
  • Improved TLS 1.3 support when using OpenSSL 1.1.1 or newer
  • Client-specific tls-crypt keys (—tls-crypt-v2)
  • Improved Data channel cipher negotiation
  • Removal of BF-CBC support in default configuration (see below for possible incompatibilities)

Server-side improvements

  • HMAC based auth-token support for seamless reconnects to standalone servers or a group of servers.
  • Asynchronous (deferred) authentication support for auth-pam plugin
  • Asynchronous (deferred) support for client-connect scripts and plugins

Network-related changes

  • Support IPv4 configs with /31 netmasks now
  • 802.1q VLAN support on TAP servers
  • IPv6-only tunnels
  • New option —block-ipv6 to reject all IPv6 packets (ICMPv6)

Linux-specific features

  • VRF support
  • Netlink integration (OpenVPN no longer needs to execute ifconfig/route or ip commands)

Windows-specific features

  • Wintun driver support, a faster alternative to tap-windows6
  • Setting tun/tap interface MTU
  • Setting DHCP search domain
  • Allow unicode search string in —cryptoapicert option
  • EasyRSA3, a modern take on OpenVPN CA management
  • MSI installer

Important notices

BF-CBC cipher is no longer the default

Cipher handling for the data channel cipher has been significantly changed between OpenVPN 2.3/2.4 and v2.5, most notably there are no «default cipher BF-CBC» anymore because it is no longer considered a reasonable default. BF-CBC is still available, but it needs to be explicitly configured now.

For connections between OpenVPN 2.4 and v2.5 clients and servers, both ends will be able  to negotiate a better cipher than BF-CBC. By default they will select one of the AES-GCM ciphers, but this can be influenced using the —data-ciphers setting.

Connections between OpenVPN 2.3 and v2.5 that have no —cipher setting in the config (= defaulting to BF-CBC and not being negotiation-capable) must be updated. Unless BF-CBC is included in —data-ciphers or there is a «—cipher BF-CBC» in the OpenVPN 2.5 config, a v2.5 client or server will refuse to talk to a v2.3 server or client, because it has no common data channel cipher and negotiating a cipher is not possible. Generally, we recommend upgrading such setups to OpenVPN 2.4 or v2.5. If upgrading is not possible we recommend adding data-ciphers AES-256-GCM:AES-128-GCM:AES-128-CBC (for v2.5+) or cipher AES-128-CBC (v2.4.x and older) to the configuration of all clients and servers.

If you really need to use an unsupported OpenVPN 2.3 (or even older) release and need to stay on BF-CBC (not recommended), the OpenVPN 2.5 based client will need a config file change to re-enable BF-CBC.  But be warned that BF-CBC and other related weak ciphers will be removed in coming OpenVPN major releases.

Connectivity to some VPN service provider may break

Connecting with an OpenVPN 2.5 client to at least one commercial VPN service that

implemented their own cipher negotiation method that always reports back that it is using BF-CBC to the client is broken in v2.5. This has always caused warning about mismatch ciphers. We have been in contact with some service providers and they are looking into it.  This is not something the OpenVPN community can fix.  If your commercial VPN does not work with a v2.5 client, complain to the VPN service provider.

More details on these new features as well as a list of deprecated features and user-visible changes are available in Changes.rst.

The OpenVPN community project team is proud to release OpenVPN 2.5.0 which is a new major release with many new features.

Source tarball (gzip)
GnuPG Signature openvpn-2.5.0.tar.gz
Source tarball (xz)
GnuPG Signature openvpn-2.5.0.tar.xz
Source zip
GnuPG Signature openvpn-2.5.0.zip
Windows 32-bit MSI installer
GnuPG Signature OpenVPN-2.5.0-I601-x86.msi
Windows 64-bit MSI installer
GnuPG Signature OpenVPN-2.5.0-I601-amd64.msi

Overview of changes since OpenVPN 2.4

Faster connections

  • Connections setup is now much faster

Crypto specific changes

  • ChaCha20-Poly1305 cipher in the OpenVPN data channel (Requires OpenSSL 1.1.0 or newer)
  • Improved TLS 1.3 support when using OpenSSL 1.1.1 or newer
  • Client-specific tls-crypt keys (—tls-crypt-v2)
  • Improved Data channel cipher negotiation
  • Removal of BF-CBC support in default configuration (see below for possible incompatibilities)

Server-side improvements

  • HMAC based auth-token support for seamless reconnects to standalone servers or a group of servers.
  • Asynchronous (deferred) authentication support for auth-pam plugin
  • Asynchronous (deferred) support for client-connect scripts and plugins

Network-related changes

  • Support IPv4 configs with /31 netmasks now
  • 802.1q VLAN support on TAP servers
  • IPv6-only tunnels
  • New option —block-ipv6 to reject all IPv6 packets (ICMPv6)

Linux-specific features

  • VRF support
  • Netlink integration (OpenVPN no longer needs to execute ifconfig/route or ip commands)

Windows-specific features

  • Wintun driver support, a faster alternative to tap-windows6
  • Setting tun/tap interface MTU
  • Setting DHCP search domain
  • Allow unicode search string in —cryptoapicert option
  • EasyRSA3, a modern take on OpenVPN CA management
  • MSI installer

Important notices

BF-CBC cipher is no longer the default

Cipher handling for the data channel cipher has been significantly changed between OpenVPN 2.3/2.4 and v2.5, most notably there are no «default cipher BF-CBC» anymore because it is no longer considered a reasonable default. BF-CBC is still available, but it needs to be explicitly configured now.

For connections between OpenVPN 2.4 and v2.5 clients and servers, both ends will be able  to negotiate a better cipher than BF-CBC. By default they will select one of the AES-GCM ciphers, but this can be influenced using the —data-ciphers setting.

Connections between OpenVPN 2.3 and v2.5 that have no —cipher setting in the config (= defaulting to BF-CBC and not being negotiation-capable) must be updated. Unless BF-CBC is included in —data-ciphers or there is a «—cipher BF-CBC» in the OpenVPN 2.5 config, a v2.5 client or server will refuse to talk to a v2.3 server or client, because it has no common data channel cipher and negotiating a cipher is not possible. Generally, we recommend upgrading such setups to OpenVPN 2.4 or v2.5. If upgrading is not possible we recommend adding data-ciphers AES-256-GCM:AES-128-GCM:AES-128-CBC (for v2.5+) or cipher AES-128-CBC (v2.4.x and older) to the configuration of all clients and servers.

If you really need to use an unsupported OpenVPN 2.3 (or even older) release and need to stay on BF-CBC (not recommended), the OpenVPN 2.5 based client will need a config file change to re-enable BF-CBC.  But be warned that BF-CBC and other related weak ciphers will be removed in coming OpenVPN major releases.

Connectivity to some VPN service provider may break

Connecting with an OpenVPN 2.5 client to at least one commercial VPN service that

implemented their own cipher negotiation method that always reports back that it is using BF-CBC to the client is broken in v2.5. This has always caused warning about mismatch ciphers. We have been in contact with some service providers and they are looking into it.  This is not something the OpenVPN community can fix.  If your commercial VPN does not work with a v2.5 client, complain to the VPN service provider.

More details on these new features as well as a list of deprecated features and user-visible changes are available in Changes.rst.

The OpenVPN community project team is proud to release OpenVPN 2.4.11. It fixes two related security vulnerabilities (CVE-2020-15078) which under very specific circumstances allow tricking a server using delayed authentication (plugin or management) into returning a PUSH_REPLY before the AUTH_FAILED message, which can possibly be used to gather information about a VPN setup. This release also includes other bug fixes and improvements. The I602 Windows installers fix a possible security issue with OpenSSL config autoloading on Windows (CVE-2021-3606). Updated OpenSSL and OpenVPN GUI are included in Windows installers.

Source Tarball (gzip)
GnuPG Signature openvpn-2.4.11.tar.gz
Source Tarball (xz)
GnuPG Signature openvpn-2.4.11.tar.xz
Source Zip
GnuPG Signature openvpn-2.4.11.zip
Windows 7/8/8.1/Server 2012r2 installer (NSIS)
GnuPG Signature openvpn-install-2.4.11-I602-Win7.exe
Windows 10/Server 2016/Server 2019 installer (NSIS)
GnuPG Signature openvpn-install-2.4.11-I602-Win10.exe

A summary of the changes is available in Changes.rst, and a full list of changes is available here.

Please note that LibreSSL is not a supported crypto backend. We accept patches and we do test on OpenBSD 6.0 which comes with LibreSSL, but if newer versions of LibreSSL break API compatibility we do not take responsibility to fix that.

Also note that Windows installers have been built with NSIS version that has been patched against several NSIS installer code execution and privilege escalation problems. Based on our testing, though, older Windows versions such as Windows 7 might not benefit from these fixes. We thus strongly encourage you to always move NSIS installers to a non-user-writeable location before running them.

Please note that OpenVPN 2.4 installers will not work on Windows XP. The last OpenVPN version that supports Windows XP is 2.3.18, which is downloadable as 32-bit and 64-bit versions.

If you find a bug in this release, please file a bug report to our Trac bug tracker. In uncertain cases please contact our developers first, either using the openvpn-devel mailinglist or the developer IRC channel (#openvpn-devel at irc.libera.chat). For generic help take a look at our official documentation, wiki, forums, openvpn-users mailing list and user IRC channel (#openvpn at irc.libera.chat).

Important: you will need to use the correct installer for your operating system. The Windows 10 installer works on Windows 10 and Windows Server 2016/2019. The Windows 7 installer will work on Windows 7/8/8.1/Server 2012r2. This is because of Microsoft’s driver signing requirements are different for kernel-mode devices drivers, which in our case affects OpenVPN’s tap driver (tap-windows6).

This is primarily a maintenance release with bugfixes and small improvements. Windows installers include the latest OpenSSL version (1.1.1i) which includes security fixes.

A summary of the changes is available in Changes.rst, and a full list of changes is available here.

Please note that LibreSSL is not a supported crypto backend. We accept patches and we do test on OpenBSD 6.0 which comes with LibreSSL, but if newer versions of LibreSSL break API compatibility we do not take responsibility to fix that.

Also note that Windows installers have been built with NSIS version that has been patched against several NSIS installer code execution and privilege escalation problems. Based on our testing, though, older Windows versions such as Windows 7 might not benefit from these fixes. We thus strongly encourage you to always move NSIS installers to a non-user-writeable location before running them.

Please note that OpenVPN 2.4 installers will not work on Windows XP. The last OpenVPN version that supports Windows XP is 2.3.18, which is downloadable as 32-bit and 64-bit versions.

If you find a bug in this release, please file a bug report to our Trac bug tracker. In uncertain cases please contact our developers first, either using the openvpn-devel mailinglist or the developer IRC channel (#openvpn-devel at irc.libera.chat). For generic help take a look at our official documentation, wiki, forums, openvpn-users mailing list and user IRC channel (#openvpn at irc.libera.chat).

Important: you will need to use the correct installer for your operating system. The Windows 10 installer works on Windows 10 and Windows Server 2016/2019. The Windows 7 installer will work on Windows 7/8/8.1/Server 2012r2. This is because of Microsoft’s driver signing requirements are different for kernel-mode devices drivers, which in our case affects OpenVPN’s tap driver (tap-windows6).

Source Tarball (gzip)
GnuPG Signature openvpn-2.4.10.tar.gz
Source Tarball (xz)
GnuPG Signature openvpn-2.4.10.tar.xz
Source Zip
GnuPG Signature openvpn-2.4.10.zip
Windows 7/8/8.1/Server 2012r2 installer (NSIS)
GnuPG Signature openvpn-install-2.4.10-I601-Win7.exe
Windows 10/Server 2016/Server 2019 installer (NSIS)
GnuPG Signature openvpn-install-2.4.10-I601-Win10.exe

Instructions for verifying the signatures are available here.

This release is also available in our own software repositories for Debian and Ubuntu, Supported architectures are i386 and amd64. For details. look here.

The Windows installers are bundled with OpenVPN-GUI — its source code is available on its project page and as tarballs on our alternative download server.

This is primarily a maintenance release with bugfixes and improvements. This release also fixes a security issue (CVE-2020-11810, trac #1272) which allows disrupting service of a freshly connected client that has not yet not negotiated session keys. The vulnerability cannot be used to inject or steal VPN traffic.

A summary of the changes is available in Changes.rst, and a full list of changes is available here.

Please note that LibreSSL is not a supported crypto backend. We accept patches and we do test on OpenBSD 6.0 which comes with LibreSSL, but if newer versions of LibreSSL break API compatibility we do not take responsibility to fix that.

Also note that Windows installers have been built with NSIS version that has been patched against several NSIS installer code execution and privilege escalation problems. Based on our testing, though, older Windows versions such as Windows 7 might not benefit from these fixes. We thus strongly encourage you to always move NSIS installers to a non-user-writeable location before running them. We are moving to MSI installers in OpenVPN 2.5, but OpenVPN 2.4.x will remain NSIS-only.

Compared to OpenVPN 2.3 this is a major update with a large number of new features, improvements and fixes. Some of the major features are AEAD (GCM) cipher and Elliptic Curve DH key exchange support, improved IPv4/IPv6 dual stack support and more seamless connection migration when client’s IP address changes (Peer-ID). Also, the new —tls-crypt feature can be used to increase users’ connection privacy.

OpenVPN GUI bundled with the Windows installer has a large number of new features compared to the one bundled with OpenVPN 2.3. One of major features is the ability to run OpenVPN GUI without administrator privileges. For full details, see the changelog. The new OpenVPN GUI features are documented here.

Please note that OpenVPN 2.4 installers will not work on Windows XP. The last OpenVPN version that supports Windows XP is 2.3.18, which is downloadable as 32-bit and 64-bit versions.

If you find a bug in this release, please file a bug report to our Trac bug tracker. In uncertain cases please contact our developers first, either using the openvpn-devel mailinglist or the developer IRC channel (#openvpn-devel at irc.libera.chat). For generic help take a look at our official documentation, wiki, forums, openvpn-users mailing list and user IRC channel (#openvpn at irc.libera.chat).

Important: you will need to use the correct installer for your operating system. The Windows 10 installer works on Windows 10 and Windows Server 2016/2019. The Windows 7 installer will work on Windows 7/8/8.1/Server 2012r2. This is because of Microsoft’s driver signing requirements are different for kernel-mode devices drivers, which in our case affects OpenVPN’s tap driver (tap-windows6).

Source Tarball (gzip)
GnuPG Signature openvpn-2.4.9.tar.gz
Source Tarball (xz)
GnuPG Signature openvpn-2.4.9.tar.xz
Source Zip
GnuPG Signature openvpn-2.4.9.zip
Windows 7/8/8.1/Server 2012r2 installer (NSIS)
GnuPG Signature openvpn-install-2.4.9-I601-Win7.exe
Windows 10/Server 2016/Server 2019 installer (NSIS)
GnuPG Signature openvpn-install-2.4.9-I601-Win10.exe

NOTE: the GPG key used to sign the release files has been changed since OpenVPN 2.4.0. Instructions for verifying the signatures, as well as the new GPG public key are available here.

We also provide static URLs pointing to latest releases to ease automation. For a list of files look here.

This release is also available in our own software repositories for Debian and Ubuntu, Supported architectures are i386 and amd64. For details. look here.

You can use EasyRSA 2 or EasyRSA 3 for generating your own certificate authority. The former is bundled with Windows installers. The latter is a more modern alternative for UNIX-like operating systems.

The Windows installers are bundled with OpenVPN-GUI — its source code is available on its project page and as tarballs on our alternative download server.

This is primarily a maintenance release with bugfixes and improvements. The Windows installers (I601) have several improvements compared to the previous release:

  • New tap-windows6 driver (9.24.2) which fixes some suspend and resume issues
  • Latest OpenVPN-GUI
  • Considerable performance boost due to new compiler optimization flags

A summary of the changes is available in Changes.rst, and a full list of changes is available here.

Please note that LibreSSL is not a supported crypto backend. We accept patches and we do test on OpenBSD 6.0 which comes with LibreSSL, but if newer versions of LibreSSL break API compatibility we do not take responsibility to fix that.

Also note that Windows installers have been built with NSIS version that has been patched against several NSIS installer code execution and privilege escalation problems. Based on our testing, though, older Windows versions such as Windows 7 might not benefit from these fixes. We thus strongly encourage you to always move NSIS installers to a non-user-writeable location before running them. We are moving to MSI installers in OpenVPN 2.5, but OpenVPN 2.4.x will remain NSIS-only.

Compared to OpenVPN 2.3 this is a major update with a large number of new features, improvements and fixes. Some of the major features are AEAD (GCM) cipher and Elliptic Curve DH key exchange support, improved IPv4/IPv6 dual stack support and more seamless connection migration when client’s IP address changes (Peer-ID). Also, the new —tls-crypt feature can be used to increase users’ connection privacy.

OpenVPN GUI bundled with the Windows installer has a large number of new features compared to the one bundled with OpenVPN 2.3. One of major features is the ability to run OpenVPN GUI without administrator privileges. For full details, see the changelog. The new OpenVPN GUI features are documented here.

Please note that OpenVPN 2.4 installers will not work on Windows XP. The last OpenVPN version that supports Windows XP is 2.3.18, which is downloadable as 32-bit and 64-bit versions.

If you find a bug in this release, please file a bug report to our Trac bug tracker. In uncertain cases please contact our developers first, either using the openvpn-devel mailinglist or the developer IRC channel (#openvpn-devel at irc.libera.chat). For generic help take a look at our official documentation, wiki, forums, openvpn-users mailing list and user IRC channel (#openvpn at irc.libera.chat).

Important: you will need to use the correct installer for your operating system. The Windows 10 installer works on Windows 10 and Windows Server 2016/2019. The Windows 7 installer will work on Windows 7/8/8.1/Server 2012r2. This is because of Microsoft’s driver signing requirements are different for kernel-mode devices drivers, which in our case affects OpenVPN’s tap driver (tap-windows6).

Source Tarball (gzip)
GnuPG Signature openvpn-2.4.8.tar.gz
Source Tarball (xz)
GnuPG Signature openvpn-2.4.8.tar.xz
Source Zip
GnuPG Signature openvpn-2.4.8.zip
Windows 7/8/8.1/Server 2012r2 installer (NSIS)
GnuPG Signature openvpn-install-2.4.8-I602-Win7.exe
Windows 10/Server 2016/Server 2019 installer (NSIS)
GnuPG Signature openvpn-install-2.4.8-I602-Win10.exe

NOTE: the GPG key used to sign the release files has been changed since OpenVPN 2.4.0. Instructions for verifying the signatures, as well as the new GPG public key are available here.

We also provide static URLs pointing to latest releases to ease automation. For a list of files look here.

This release is also available in our own software repositories for Debian and Ubuntu, Supported architectures are i386 and amd64. For details. look here.

You can use EasyRSA 2 or EasyRSA 3 for generating your own certificate authority. The former is bundled with Windows installers. The latter is a more modern alternative for UNIX-like operating systems.

The Windows installers are bundled with OpenVPN-GUI — its source code is available on its project page and as tarballs on our alternative download server.

This is primarily a maintenance release with bugfixes and improvements. One of the big things is enhanced TLS 1.3 support. A summary of the changes is available in Changes.rst, and a full list of changes is available here.

Please note that LibreSSL is not a supported crypto backend. We accept patches and we do test on OpenBSD 6.0 which comes with LibreSSL, but if newer versions of LibreSSL break API compatibility we do not take responsibility to fix that.

Also note that Windows installers have been built with NSIS version that has been patched against several NSIS installer code execution and privilege escalation problems. Based on our testing, though, older Windows versions such as Windows 7 might not benefit from these fixes. We thus strongly encourage you to always move NSIS installers to a non-user-writeable location before running them. We are moving to MSI installers in OpenVPN 2.5, but OpenVPN 2.4.x will remain NSIS-only.

Compared to OpenVPN 2.3 this is a major update with a large number of new features, improvements and fixes. Some of the major features are AEAD (GCM) cipher and Elliptic Curve DH key exchange support, improved IPv4/IPv6 dual stack support and more seamless connection migration when client’s IP address changes (Peer-ID). Also, the new —tls-crypt feature can be used to increase users’ connection privacy.

OpenVPN GUI bundled with the Windows installer has a large number of new features compared to the one bundled with OpenVPN 2.3. One of major features is the ability to run OpenVPN GUI without administrator privileges. For full details, see the changelog. The new OpenVPN GUI features are documented here.

Please note that OpenVPN 2.4 installers will not work on Windows XP. The last OpenVPN version that supports Windows XP is 2.3.18, which is downloadable as 32-bit and 64-bit versions.

If you find a bug in this release, please file a bug report to our Trac bug tracker. In uncertain cases please contact our developers first, either using the openvpn-devel mailinglist or the developer IRC channel (#openvpn-devel at irc.libera.chat). For generic help take a look at our official documentation, wiki, forums, openvpn-users mailing list and user IRC channel (#openvpn at irc.libera.chat).

Important: you will need to use the correct installer for your operating system. The Windows 10 installer will not work on Windows 7/8/8.1/Server 2012r2. This is because Microsoft’s driver signing requirements and tap-windows6. For the same reason you need to use an older installer with Windows Server 2016. This older installer has a local privilege escalation vulnerability issue which we cannot resolve for Windows Server 2016 until tap-windows6 passes the HLK test suite on that platform. In the meanwhile we recommend Windows Server 2016 users to avoid installing OpenVPN/tap-windows6 driver on hosts where all users can’t be trusted. Users of Windows 7-10 and Server 2012r2 are recommended to update to latest installers as soon as possible.

Source Tarball (gzip)
GnuPG Signature openvpn-2.4.7.tar.gz
Source Tarball (xz)
GnuPG Signature openvpn-2.4.7.tar.xz
Source Zip
GnuPG Signature openvpn-2.4.7.zip
Windows 7/8/8.1/Server 2012r2 installer (NSIS)
GnuPG Signature openvpn-install-2.4.7-I607-Win7.exe
Windows 10 installer (NSIS)
GnuPG Signature openvpn-install-2.4.7-I607-Win10.exe
Windows Server 2016 installer (NSIS)
GnuPG Signature openvpn-install-2.4.7-I603.exe

NOTE: the GPG key used to sign the release files has been changed since OpenVPN 2.4.0. Instructions for verifying the signatures, as well as the new GPG public key are available here.

We also provide static URLs pointing to latest releases to ease automation. For a list of files look here.

This release is also available in our own software repositories for Debian and Ubuntu, Supported architectures are i386 and amd64. For details. look here.

You can use EasyRSA 2 or EasyRSA 3 for generating your own certificate authority. The former is bundled with Windows installers. The latter is a more modern alternative for UNIX-like operating systems.

The Windows installers are bundled with OpenVPN-GUI — its source code is available on its project page and as tarballs on our alternative download server.

This is primarily a maintenance release with minor bugfixes and improvements, and one security relevant fix for the Windows Interactive Service. Windows installer includes updated OpenVPN GUI and OpenSSL. Installer I601 included tap-windows6 driver 9.22.1 which had one security fix and dropped Windows Vista support. However, in installer I602 we had to revert back to tap-windows 9.21.2 due to driver getting reject on freshly installed Windows 10 rev 1607 and later when Secure Boot was enabled. The failure was due to the new, more strict driver signing requirements. The 9.22.1 version of the driver is in the process of getting approved and signed by Microsoft and will be bundled in an upcoming Windows installer.

Please note that LibreSSL is not a supported crypto backend. We accept patches and we do test on OpenBSD 6.0 which comes with LibreSSL, but if newer versions of LibreSSL break API compatibility we do not take responsibility to fix that.

Also note that Windows installers have been built with NSIS version that has been patched against several NSIS installer code execution and privilege escalation problems. Based on our testing, though, older Windows versions such as Windows 7 might not benefit from these fixes. We thus strongly encourage you to always move NSIS installers to a non-user-writeable location before running them. Our long-term plan is to migrate to using MSI installers instead.

Compared to OpenVPN 2.3 this is a major update with a large number of new features, improvements and fixes. Some of the major features are AEAD (GCM) cipher and Elliptic Curve DH key exchange support, improved IPv4/IPv6 dual stack support and more seamless connection migration when client’s IP address changes (Peer-ID). Also, the new —tls-crypt feature can be used to increase users’ connection privacy.

A summary of the changes is available in Changes.rst, and a full list of changes is available here.

OpenVPN GUI bundled with the Windows installer has a large number of new features compared to the one bundled with OpenVPN 2.3. One of major features is the ability to run OpenVPN GUI without administrator privileges. For full details, see the changelog. The new OpenVPN GUI features are documented here.

Please note that OpenVPN 2.4 installers will not work on Windows XP.

If you find a bug in this release, please file a bug report to our Trac bug tracker. In uncertain cases please contact our developers first, either using the openvpn-devel mailinglist or the developha er IRC channel (#openvpn-devel at irc.libera.chat). For generic help take a look at our official documentation, wiki, forums, openvpn-users mailing list and user IRC channel (#openvpn at irc.libera.chat).

Source Tarball (gzip)
GnuPG Signature openvpn-2.4.6.tar.gz
Source Tarball (xz)
GnuPG Signature openvpn-2.4.6.tar.xz
Source Zip
GnuPG Signature openvpn-2.4.6.zip
Windows installer (NSIS)
GnuPG Signature openvpn-install-2.4.6-I602.exe

NOTE: the GPG key used to sign the release files has been changed since OpenVPN 2.4.0. Instructions for verifying the signatures, as well as the new GPG public key are available here.

We also provide static URLs pointing to latest releases to ease automation. For a list of files look here.

This release is also available in our own software repositories for Debian and Ubuntu, Supported architectures are i386 and amd64. For details. look here.

You can use EasyRSA 2 or EasyRSA 3 for generating your own certificate authority. The former is bundled with Windows installers. The latter is a more modern alternative for UNIX-like operating systems.

The Windows installers are bundled with OpenVPN-GUI — its source code is available on its project page and as tarballs on our alternative download server.

You can download Windows developments snapshots (MSI installers) from here (Index of /downloads/snapshots/github-actions/openvpn2/ ). Those are automatically built from commits to OpenVPN master branch and include functionality which will be available in the next release. Development snapshots are less stable than releases, so use at your own risk.

OpenVPN
для Windows

OpenVPN скриншот № 1

OpenVPN — кроссплатформенный инструмент для безопасного туннелирования IP-сетей через единственный UDP или TCP-порт с поддержкой аутентификации сессий и обмена ключами на основе SSL/TLS, шифрования, аутентификации и сжатия пакетов. Поддерживается широкий спектр конфигураций, динамических IP-адресов и NAT, присутствует возможность настраивать удаленный доступ, VPN-соединения типа «точка-точка» и пр.

Основные возможности OpenVPN:

  • Поддержка прокси серверов, включая HTTP, SOCKS, NAT и сетевые фильтры.
  • Сетевые операции через TCP или UDP транспорт.
  • Туннелирования IP-сетей через единственный UDP или TCP-порт с поддержкой аутентификации сессий.
  • Эффективное сжатие трафика.
  • Поддержка нескольких протоколов шифрования (MD5-HMAC, RSA) и 2048-битного ключа.
  • Возможность настраивать удаленный доступ.
  • Поддержка динамических IP-адресов и NAT.
  • VPN-соединения типа «точка-точка».

ТОП-сегодня раздела «Анонимайзеры, VPN»

скачать Tor BrowserTor Browser 12.5.6

Предоставляет надежную защиту персональной информации и конфиденциальности, которая…

скачать Planet VPNPlanet VPN 2.1.19.1

Бесплатный VPN с возможностями, функционалом и защищенностью на уровне топовых платных…

скачать AdGuard VPNAdGuard VPN 2.1.0

Удобный инструмент для интернет-безопасности и защиты конфиденциальности в Сети,…

скачать WindscribeWindscribe 2.6.14

Удобное решение, которое представляет собой набор инструментов, которые работают вместе…

скачать DNS JumperDNS Jumper 2.2

DNS Jumper — небольшое бесплатное приложение для быстрого переключения DNS на ПК для повышения уровня безопасности или увеличения скорости работы в Интернете…

Отзывы о программе OpenVPN

Сергей про OpenVPN 2.5.7 [12-07-2022]

OpenVPN-2.5.7-I602-arm64 Win10 очень классная программа, бесплатная и работает на все100%
7 | 13 | Ответить

Валерий про OpenVPN 2.5.6 [24-03-2022]

Хрень, полная ни фига эта прога не меняет ваш регион и ип. Зря качал.
6 | 39 | Ответить

Алексей в ответ Валерий про OpenVPN 2.5.7 [18-01-2023]

Ну если не знать для чего существует данная программа, то хаять конечно же проще.
Свою задачу она выполняет на все 100%
7 | 8 | Ответить

OpenVPN – это набор open source программ, который заслуженно является одним из самых популярных и легких решений для реализации защищенной VPN сети. OpenVPN позволяет объединить в единую сеть сервер и клиентов (даже находящиеся за NAT или файерволами), или объединить сети удаленных офисов. Серверную часть OpenVPN можно развернуть практически на всех доступных операционных системах (пример настройки OpenVPN на Linux). Вы можете установить OpenVPN сервер даже на обычный компьютер с десктопной редакцией Windows 10.

В этой статье, мы покажем, как установить OpenVPN сервер на компьютер с Windows 10, настроить OpenVPN клиент на другом Windows хосте и установить защищенное VPN подключение.

Содержание:

  • Установка службы OpenVPN сервера в Windows
  • Создаем ключи шифрования и сертификаты для OpenVPN
  • Конфигурационный файл OpenVPN сервера в Windows
  • Настройка OpenVPN клиента в Windows

Установка службы OpenVPN сервера в Windows

Скачайте MSI установщик OpenVPN для вашей версии Windows с официального сайта (https://openvpn.net/community-downloads/). В нашем случае это OpenVPN-2.5.5-I602-amd64.msi (https://swupdate.openvpn.org/community/releases/OpenVPN-2.5.5-I602-amd64.msi).

Запустите установку.

Если вы планируете, OpenVPN сервер работал в автоматическом режиме, можно не устанавливать OpenVPN GUI. Обязательно установите OpenVPN Services.

установка openvpn сервера в windows 10

Начиная с версии OpenVPN 2.5, поддерживается драйвер WinTun от разработчиков WireGuard. Считается, что этот драйвер работает быстрее чем классический OpenVPN драйвер TAP. Установите драйвер Wintun, откажитесь от установки TAP-Windows6.

Установите OpenSSL утилиту EasyRSA Certificate Management Scripts.

WinTun драйвер openvpn

Запустите установку.

По умолчанию OpenVPN устаналивается в каталог C:\Program Files\OpenVPN.

После окончания установки появится новый сетевой адаптер типа Wintun Userspace Tunnel. Этот адаптер отключен, если служба OpenVPN не запущена.

сетевой адаптер Wintun Userspace Tunnel

Создаем ключи шифрования и сертификаты для OpenVPN

OpenVPN основан на шифровании OpenSSL. Это означает, что для обмена трафиком между клиентом и серверов VPN нужно сгенерировать ключи и сертификаты с использованием RSA3.

Откройте командную строку и перейдите в каталог easy-rsa:

cd C:\Program Files\OpenVPN\easy-rsa

Создайте копию файла:

copy vars.example vars

Откройте файл vars с помощью любого текстового редактора. Проверьте пути к рабочим директориям.

Обязательно поправьте переменную EASYRSA_TEMP_DIR следующим образом:

set_var EASYRSA_TEMP_DIR "$EASYRSA_PKI/temp"

EASYRSA_TEMP_DIR

Можете заполнить поля для сертификатов (опционально)

set_var EASYRSA_REQ_COUNTRY "RU"
set_var EASYRSA_REQ_PROVINCE "MSK"
set_var EASYRSA_REQ_CITY "MSK"
set_var EASYRSA_REQ_ORG "IT-Company"
set_var EASYRSA_REQ_EMAIL " [email protected] "
set_var EASYRSA_REQ_OU " IT department "

конфигурационный файл vars при установке сертфикатов easyrsa

Срок действия сертификатов задается с помощью:

#set_var EASYRSA_CA_EXPIRE 3650
#set_var EASYRSA_CERT_EXPIRE 825

Сохраните файл и выполните команду:

EasyRSA-Start.bat

Следующие команды выполняются в среде EasyRSA Shell:

Инициализация PKI:

./easyrsa init-pki

Должна появится надпись:

init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: C:/Program Files/OpenVPN/easy-rsa/pki

Теперь нужно сгенерировать корневой CA:

./easyrsa build-ca

Задайте дважды пароль для CA:

CA creation complete and you may now import and sign cert requests.

Данная команда сформировала:

  • Корневой сертификат центра сертификации: «C:\Program Files\OpenVPN\easy-rsa\pki\ca.crt»
  • Ключ центра сертификации «C:\Program Files\OpenVPN\easy-rsa\pki\private\ca.key»

Теперь нужно сгенерировать запрос сертификата и ключ для вашего сервера OpenVPN:

./easyrsa gen-req server nopass

Утилита сгенерирует два файла:

req: C:/Program Files/OpenVPN/easy-rsa/pki/reqs/server.req
key: C:/Program Files/OpenVPN/easy-rsa/pki/private/server.key

Подпишем запрос на выпуск сертификата сервера с помощью нашего CA:

./easyrsa sign-req server server

Подтвердите правильность данных, набрав yes.

Затем введите пароль CA от корневого CA.

В каталоге issued появится сертификат сервера («C:\Program Files\OpenVPN\easy-rsa\pki\issued\server.crt»)

сертификат сервера openvpn

Теперь можно создать ключи Диффи-Хеллмана (займет длительное время):
./easyrsa gen-dh

Для дополнительной защиты VPN сервера желательно включить tls-auth. Данная технология позволяет использовать подписи HMAC к handshake-пакетам SSL/TLS, инициируя дополнительную проверку целостности. Пакеты без такой подписи будут отбрасываться VPN сервером. Это защитит вас от сканирования порта VPN сервера, DoS атак, переполнения буфера SSL/TLS.

Сгенерируйте ключ tls-auth:

cd C:\Program Files\OpenVPN\bin
openvpn --genkey secret ta.key

Должен появиться файл «C:\Program Files\OpenVPN\bin\ta.key». Переместите его в каталог C:\Program Files\OpenVPN\easy-rsa\pki

Теперь можно сформировать ключи для клиентов OpenVPN. Для каждого клиента, который будет подключаться к вашему серверу нужно создать собственные ключи.

Есть несколько способов генерации ключей и передачи их клиентам. В следующем примере, мы создадим на сервере ключ клиента и защитим его паролем:

./easyrsa gen-req kbuldogov
./easyrsa sign-req client kbuldogov

пароль для защиты ключа клиента easyrsa

Данный ключ («C:\Program Files\OpenVPN\easy-rsa\pki\private\kbuldogov.key») нужно передать клиенту и сообщить пароль. Клиент может снять защиту паролем для ключа:

openssl rsa -in "C:\Program Files\OpenVPN\easy-rsa\pki\private\kbuldogov.key"-out "C:\Program Files\OpenVPN\easy-rsa\pki\private\kbuldogov_use.key"

снять защиту паролем с ключа клиента

Если вы хотите сгенерировать ключ, не защищенный паролем, нужно выполнить команду:

./easyrsa gen-req имяклиента nopass

На сервере с OpenVPN вы можете создать неограниченное количество ключей и сертификатов для пользователей. Аналогичным образом сформируйте ключи и сертфикаты для других клиентов.

Вы можете отохвать скомпрометированные сертификаты клиентов:
cd C:\Program Files\OpenVPN\easy-rsa
EasyRSA-Start.bat
./easyrsa revoke kbuldogov

Итак, мы сгенерировали набор ключей и сертификатов для OpenVPN сервера. Теперь можно настроить и запустить службу OpenVPN.

Конфигурационный файл OpenVPN сервера в Windows

Скопируйте типовой конфигурационный файл OpenVPN сервера:

copy "C:\Program Files\OpenVPN\sample-config\server.ovpn" "C:\Program Files\OpenVPN\config-auto\server.ovpn"

Откройте файл server.ovpn в любом текстовом редакторе и внесите свои настройки. Я использую следующий конфиг для OpenVPN:

# Указываем порт, протокол и устройство
port 1194
proto udp
dev tun
# Указываем пути к сертификатам сервера
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\issued\\server.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\private\\server.key"
dh "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\dh.pem"
# Указываем настройки IP сети, адреса из которой будет будут получать VPN клиенты
server 10.24.1.0 255.255.255.0
#если нужно разрешить клиентам подключаться под одним ключом, нужвно включить опцию duplicate-cn (не рекомендуется)
#duplicate-cn
# TLS защита
tls-auth "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ta.key" 0
cipher AES-256-GCM
# Другая параметры
keepalive 20 60
persist-key
persist-tun
status "C:\\Program Files\\OpenVPN\\log\\status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 3
mute 20
windows-driver wintun

Сохраните файл.

OpenVPN позволяет использовать как TCP, так и UDP для подключения. В этом примере я запустил OpenVPN на 1194 UDP. Рекомендуется использовать протокол UDP, это оптимально как с точки зрения производительности, так и безопасности.

Не забудьте открыть на файерволе порты для указанного вами порта OpenVPN на клиенте и на сервере. Можно открыть порты в Windows Defender с помощью PowerShell.
Правило для сервера:

New-NetFirewallRule -DisplayName "AllowOpenVPN-In" -Direction Inbound -Protocol UDP –LocalPort 1194 -Action Allow

Правило для клиента:

New-NetFirewallRule -DisplayName "AllowOpenVPN-Out" -Direction Outbound -Protocol UDP –LocalPort 1194 -Action Allow

Теперь нужно запустить службу OpenVPN и изменить тип ее запуска на автоматический. Воспользуйтесь таким командами PowerShell, чтобы включить службу:

Set-Service OpenVPNService –startuptype automatic –passthru
Get-Service OpenVPNService| Start-Service

запуск службы OpenVPNService

Откройте панель управления, и убедитесь, что виртуальный сетевой адаптер OpenVPN Wintun теперь активен. Если нет, смотрите лог «C:\Program Files\OpenVPN\log\server.log»

сетевой адаптер openvpn wintun

Если при запуске OpenVPN вы видите в логе ошибку:

Options error: In C:\Program Files\OpenVPN\config-auto\server.ovpn:1: Maximum option line length (256) exceeded, line starts with..

Смените в файле server.ovpn символы переноса строки на Windows CRLF (в notepad++ нужно выбрать Edit -> EOL Conversion -> Windows CR LF). Сохраните файл, перезапустите службу OpevVPNService.

Данный конфиг позволит удаленным клиентам получить доступ только к серверу, но другие компьютеры и сервисы в локальной сети сервера для них недоступны. Чтобы разрешить клиентам OpenVPN получить доступ к внутренней сети нужно:

Включить опцию IPEnableRouter в реестре (включает IP маршрутизацию в Windows, в том числе включает маршрутизацию меду сетями Hyper-V): reg add «HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters» /v IPEnableRouter /t REG_DWORD /d 1 /f

Добавьте в конфгурационный файл сервера OpenVPN маршруты до внутренней IP сети:

push "route 10.24.1.0 255.255.255.0"
push "route 192.168.100.0 255.255.255.0"

Если нужно, назначьте клиенту адреса DNS серверов:

push "dhcp-option DNS 192.168.100.11"
push "dhcp-option DNS 192.168.100.12"

Если нужно завернуть все запросы клиента (в том числе Интернет трафик) на ваш OpenVPN сервер, добавьте опцию:

push "redirect-gateway def1"

Настройка OpenVPN клиента в Windows

Создайте на сервере шаблонный конфигурационный файла для клиента VPN (на базе iшаблона client.ovpn) со следующими параметрами (имя файла kbuldovov.ovpn)

client
dev tun
proto udp
remote your_vpn_server_address 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert kbuldogov.crt
key kbuldogov.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-GCM
connect-retry-max 25
verb 3

В директиве remote указывается публичный IP адрес или DNS имя вашего сервера OpenVPN.

Скачайте и установите клиент OpenVPN Connect для Windows (https://openvpn.net/downloads/openvpn-connect-v3-windows.msi).

установка openvpn connect в windows

Теперь на компьютер с клиентом OpenVPN нужно с сервера скопировать файлы:

  • ca.crt
  • kbuldogov.crt
  • kbuldogov.key
  • dh.pem
  • ta.key
  • kbuldogov.ovpn

импорт конфигурации клиента ovpn в openvpn клиент

Теперь импортируйте файл с профилем *.ovpn и попробуйте подключиться к вашему VPN серверу.

Если все настроено правильно, появится такая картинка. подключение к openvpn установлено

Проверьте теперь лог OpenVPN на клиенте «C:\Program Files\OpenVPN Connect\agent.log»

Mon Dec 27 08:09:30 2021 proxy_auto_config_url
Mon Dec 27 08:09:31 2021 TUN SETUP
TAP ADAPTERS:
guid='{25EE4A55-BE90-45A0-88A1-8FA8FEF24C42}' index=22 name='Local Area Connection'
Open TAP device "Local Area Connection" PATH="\\.\Global\{25EE4A55-BE90-45A0-88A1-8FA8FEF24C42}.tap" SUCCEEDED
TAP-Windows Driver Version 9.24
ActionDeleteAllRoutesOnInterface iface_index=22
netsh interface ip set interface 22 metric=1
Ok.
netsh interface ip set address 22 static 10.24.1.6 255.255.255.252 gateway=10.24.1.5 store=active
IPHelper: add route 10.24.1.1/32 22 10.24.1.5 metric=-1

Клиент успешно подключится к OpenVPN серверу и получил IP адрес 10.24.1.6.

Проверьте теперь лог на сервере («C:\Program Files\OpenVPN\log\openvpn.log»). Здесь также видно, что клиент с сертификатом kbuldogov успешно подключится к вашему серверу.

2021-12-27 08:09:35 192.168.13.202:55648 [kbuldogov] Peer Connection Initiated with [AF_INET6]::ffff:192.168.13.202:55648
2021-12-27 08:09:35 kbuldogov/192.168.13.202:55648 MULTI_sva: pool returned IPv4=10.24.1.6, IPv6=(Not enabled)
2021-12-27 08:09:35 kbuldogov/192.168.13.202:55648 MULTI: Learn: 10.24.1.6 -> kbuldogov/192.168.13.202:55648
2021-12-27 08:09:35 kbuldogov/192.168.13.202:55648 MULTI: primary virtual IP for kbuldogov/192.168.13.202:55648: 10.24.1.6

Установим и настроим OpenVPN сервер. На сервере используется операционная система Windows Server 2019.

OpenVPN — бесплатная реализация технологии виртуальной частной сети (VPN) для создания зашифрованных каналов связи между компьютерами типа точка-точка или сервер-клиенты за NAT и Firewall.

Установка OpenVPN Server

Скачиваем дистрибутив для установки OpenVPN:

Community Downloads

vpn

Прокручиваем вниз, выбираем стабильную версию. Я буду использовать версию 2.4.9.

Для операционной системы Windows доступны два пакета:

  • WINDOWS 7/8/8.1/SERVER 2012R2 INSTALLER (NSIS)
  • WINDOWS 10/SERVER 2016/SERVER 2019 INSTALLER (NSIS)

Для Windows Server 2019 подходит второй вариант, скачиваю.

vpn

Запускаем инсталлятор OpenVPN.

vpn

Открывается мастер установки. Next.

vpn

Принимаем лицензионное соглашение. I Agree.

vpn

Выбираем компоненты. Выделите EasyRSA 2 Certificate Management Scripts. Для сервера OpenVPN GUI можно не устанавливать, если вы планируете запускать OpenVPN в качестве службы. Next.

vpn

Выбираем путь установки, я оставляю по умолчанию C:\Program Files\OpenVPN. Install.

vpn

Начинается процесс установки OpenVPN.

vpn

Установка успешно завершена. Next.

vpn

Finish.

vpn

Установка выполнена в директорию C:\Program Files\OpenVPN.

vpn

После установки у нас появляется новый сетевой адаптер TAP-Windows Adapter V9.

vpn

Адаптер отключён. Если по каким-то причинам нужно добавить несколько таких адаптеров, то загляните в папку C:\Program Files\TAP-Windows\bin.

vpn

Здесь есть скрипты для установки адаптера, добавления адаптера и удаления всех адаптеров.

vpn

Пример установки адаптера. В командной строке под администратором:

cd "C:\Program Files\TAP-Windows\bin"
"C:\Program Files\TAP-Windows\bin\tapinstall.exe" install "C:\Program Files\TAP-Windows\driver\OemVista.inf" tap0901

В большинстве случаев дополнительно настраивать сетевой адаптер не требуется.

Создание ключей и сертификатов

Запускаем командную строку под администратором и переходим в рабочую директорию C:\Program Files\OpenVPN\easy-rsa.

cd C:\Program Files\OpenVPN\easy-rsa

В этой папке есть всё необходимое для генерации сертификатов.

vpn

Выполняем:

init-config.bat
copy vars.bat.sample vars.bat

Создаётся файл vars.bat с настройками и примером готовых параметров для создания CSR запроса сертификатов. Заполним его. Открываем vars.bat блокнотом.

notepad vars.bat

vpn

Открывается vars.bat.

vpn

Здесь стоит обратить внимание на пути к рабочим директориям. Например, вы можете указать свой путь к openssl.exe, если установили OpenVPN в другую директорию. Здесь же можно изменить длину ключей шифрования.

vpn

Заполняем переменные в нижней части файла, указываем:

  • KEY_COUNTRY — страна
  • KEY_PROVINCE — область
  • KEY_CITY — город
  • KEY_ORG — организация
  • KEY_EMAIL — e-mail
  • KEY_CN — (Common Name) имя сервера
  • KEY_NAME — (Name) имя сервера
  • KEY_OU — (Organization Unit) отдел
  • PKCS11_MODULE_PATH — для токенов двухфакторной аутентификации, нам не требуется, укажу имя сервера
  • PKC11_PIN — ПИН для токенов двухфакторной аутентификации, нам не требуется, укажу 1234

Для каждого сертификата нужно будет указывать свои NAME и COMMON NAME, можно их не указывать в vars.bat, потому как при генерации все параметры будут запрашивать.

Обращаем внимание на строку:

set KEY_KONFIG=openssl-1.0.0.cnf

Это имя конфигурационного файла. Находим его в рабочей директории.

vpn

Откроем блокнотом.

vpn

Внутри есть параметр default_days, в котором можно указать срок действия будущих сертификатов. По умолчанию у меня стоит 3650 дней, это 10 лет. Меня устраивает. Вероятно, кому-то при генерации клиентских сертификатов может понадобиться уменьшить этот срок.

Сохраняем все изменения и возвращаемся к командной строке. Подгружаем утверждённые нами переменные:

vars.bat

vpn

Очищаем директорию с ключами:

clean-all.bat

vpn

Сертификаты, которые мы будем создавать, появятся в папке C:\Program Files\OpenVPN\easy-rsa\keys. Сейчас эта папка очистилась, в ней два файла: index.txt и serial.

vpn

Генерируем ключ и сертификат центра сертификации:

build-ca.bat

vpn

В процессе генерации сертификата нас будут спрашивать все те же параметры, которые мы указали в vars.bat. Если параметр нас устраивает (а он нас устраивает), просто нажимаем ввод и переходим к следующему вопросу. После завершения работы скрипта в папке C:\Program Files\OpenVPN\easy-rsa\keys появляется два файла:

  • ca.crt — сертификат центра сертификации
  • ca.key — ключ центра сертификации

Ключ секретный, никому не передавайте, он будет храниться на сервере.

vpn

Генерируем ключ Диффи-Хеллмана:

build-dh.bat

vpn

В папке C:\Program Files\OpenVPN\easy-rsa\keys появляется файл:

  • dh2048.pem

vpn

Генерируем ключ и сертификат сервера, назовём сервер именем «server«:

build-key-server.bat server

vpn

В процессе генерации серверного сертификата нас будут спрашивать те же параметры, которые мы указали в vars.bat. Если параметр нас устраивает (а он нас снова устраивает), просто нажимаем ввод и переходим к следующему вопросу. На вопрос Sign the certificate отвечаем y. На вопрос 1 out of 1 certificate requests certified, commit отвечаем y.

После завершения работы скрипта в папке C:\Program Files\OpenVPN\easy-rsa\keys появляется четыре файла:

  • 01.pem — не понадобится
  • server.crt — сертификат сервера
  • server.csr — запрос сертификата сервера, не понадобится
  • server.key — ключ сервера

Ключ секретный, никому не передавайте, он будет храниться на сервере.

vpn

Генерируем ключ и сертификат первого клиента. Для каждого клиента нужно указывать своё имя файла, Name и Common Name. Назовём первого клиента именем «client«:

build-key.bat client

vpn

В процессе генерации клиентского сертификата нас будут спрашивать те же параметры, которые мы указали в vars.bat. Нас устраивают все параметры кроме NAME и COMMON NAME, на них отвечаем client. Помним, что для другого клиента имя должно быть другим. На вопрос Sign the certificate отвечаем y. На вопрос 1 out of 1 certificate requests certified, commit отвечаем y.

После завершения работы скрипта в папке C:\Program Files\OpenVPN\easy-rsa\keys появляется четыре файла:

  • 02.pem — не понадобится
  • client.crt — сертификат первого клиента
  • client.csr — запрос сертификата первого клиента, не понадобится
  • client.key — ключ первого клиента

vpn

Для каждого нового клиента, который будет подключаться к серверу OpenVPN необходимо сгенерировать свой клиентский сертификат. Но это можно сделать позже, пока добьёмся подключения хотя бы одного клиента.

В настройках сервера можно потом включить настройку duplicate-cn, которая позволяет подключаться всем клиентам по одному общему сертификату, но это небезопасно и не рекомендуется. Используйте только в тестовых целях.

# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names. This is recommended
# only for testing purposes. For production use,
# each client should have its own certificate/key
# pair.
#
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE «COMMON NAME»,
# UNCOMMENT THIS LINE OUT.
;duplicate-cn

Я на сервере собираюсь использовать tls-auth для дополнительной проверки целостности, это обеспечит дополнительный уровень безопасности протокола SSL/TLS при создании соединения:

  • Сканирование прослушиваемых VPN-сервером портов
  • Инициация SSL/TLS-соединения несанкционированной машиной на раннем этапе
  • DoS-атаки и флуд на порты OpenVPN
  • Переполнение буфера SSL/TLS

При использовании tls-auth на клиенте не понадобится ключ Диффи-Хеллмана, но пусть будет. Генерируем ключ tls-auth:

openvpn --genkey --secret keys/ta.key

vpn

В папке C:\Program Files\OpenVPN\easy-rsa\keys появляется файл:

  • ta.key

vpn

Минимальный набор сертификатов сгенерирован.

Настройка OpenVPN сервера

Чтобы случайно всё не удалить, создадим папку C:\Program Files\OpenVPN\ssl и скопируем в неё сертификаты. Это будет рабочая папка сервера.

mkdir "C:\Program Files\OpenVPN\ssl"
copy "C:\Program Files\OpenVPN\easy-rsa\keys" "C:\Program Files\OpenVPN\ssl"

vpn

Создадим конфигурационный файл сервера C:\Program Files\OpenVPN\config\server.ovpn:

copy "C:\Program Files\OpenVPN\sample-config\server.ovpn" "C:\Program Files\OpenVPN\config\server.ovpn"

Открываем блокнотом и редактируем:

notepad "C:\Program Files\OpenVPN\config\server.ovpn"

Лучше изучить конфигурационный файл, я предлагаю свой вариант конфига:

port 1194
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\ssl\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\ssl\\server.crt"
key "C:\\Program Files\\OpenVPN\\ssl\\server.key"  # This file should be kept secret
dh "C:\\Program Files\\OpenVPN\\ssl\\dh2048.pem"
server 10.8.0.0 255.255.255.0
tls-auth "C:\\Program Files\\OpenVPN\\ssl\\ta.key" 0 # This file is secret
keepalive 10 120
comp-lzo
persist-key
persist-tun
cipher AES-256-CBC
status "C:\\Program Files\\OpenVPN\\log\\status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 4
mute 20

Указываем параметры сервера, пути к ключам и сертификатам. Здесь же пути к логам. Для тестирования можно использовать tcp протокол:

proto tcp

Переходим к службам:

services.msc

vpn

Находим службу OpenVPNService.

vpn

Настраиваем на автоматический запуск при загрузке сервера.

vpn

Запускаем службу.

vpn

Согласно настройкам сервера в папке C:\Program Files\OpenVPN\log должны появиться логи. Это один из инструментов администратора OpenVPN сервера.

vpn

Активировался сетевой адаптер TAP-Windows Adapter V9.

vpn

Согласно настройкам сервера IP адрес 10.8.0.1.

vpn

Проверяем поднялся ли порт tcp 1194:

netstat -tan | find "1194"

Порт должен прослушиваться.

vpn

Теперь нужно настроить firewall. Открываем Windows Defender Firewall with Advanced Security.

vpn

Переходим в Inbound Rules.

vpn

Создаём правило — New Rule…

vpn

Тип правила — Port. Next.

vpn

Протоколы и порты — UDP 1194. Как в настройках сервера. Next.

vpn

Действия — Allow the connection. Next.

vpn

Для всех сетей. Next.

vpn

Указываем название правила — OpenVPN. Next.

Правило создано, теперь firewall не блокирует входящие UDP соединения на 1194 порту.

Настройка OpenVPN клиента

На компьютере клиента устанавливаем OpenVPN точно также как на сервер. Галку EasyRSA 2 Certificate Management Scripts не указываем. Галку OpenVPN GUI указываем.

vpn

Я устанавливаю OpenVPN на клиенте в папку по умолчанию. C:\Program Files\OpenVPN.

Копируем в отдельную папку for_client (её содержимое отправим потом на компьютер клиента) на сервере файлы для клиента:

  • ca.crt
  • client.crt
  • client.key
  • dh2048.pem
  • ta.key

vpn

Туда же из папки C:\Program Files\OpenVPN\sample-config копируем client.ovpn

vpn

Переименовываю client.ovpn в config.ovpn. Можно использовать любое имя, лучше созвучное с названием организации. Вот такой получился набор.

vpn

Редактируем файл config.ovpn.

client
dev tun
proto udp
remote internet-lab.ru 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\client.crt"
key "C:\\Program Files\\OpenVPN\\config\\client.key"
tls-auth "C:\\Program Files\\OpenVPN\\config\\ta.key" 1
#dh "C:\\Program Files\\OpenVPN\\config\\dh2048.pem"
cipher AES-256-CBC
comp-lzo
verb 0
connect-retry-max 25

Здесь указываем пути к ключам и сертификатам клиента. Не забываем про адрес и порт сервера, куда подключаться, для примера я указал internet-lab.ru UDP 1194.

Отправляем подготовленные файлы на компьютер клиента и копируем в C:\Program Files\OpenVPN\config.

vpn

На клиента запускаем OpenVPN GUI.

vpn

В трее появляется значок OpenVPN.

vpn

Правой кнопкой — подключиться.

vpn

Устанавливается соединение.

vpn

Значок позеленел, назначен адрес 10.8.0.6.

vpn

Можно подключаться к серверу, если есть доступы.

vpn

Для второго и последующего клиента генерируем свой набор клиентских сертификатов.

vpn

Отзыв сертификата

Иногда нужно отозвать сертификат, выданный клиенту. Кто-то увольняется, кто-то палит сертификаты.

cd "C:\Program Files\OpenVPN\easy-rsa"
vars.bat
revoke-full client

Где client — это имя клиента.

В папке C:\Program Files\OpenVPN\keys появляется файл:

  • crl.pem

Копируем его с заменой в рабочую директорию сервера C:\Program Files\OpenVPN\ssl.

Добавляем строчку в конфигурационный файл сервера:

crl-verify "C:\\Program Files\\OpenVPN\\keys\\crl.pem"  

Перезапускаем службу OpenVPN сервера.

net stop OpenVPNService
net start OpenVPNService

Если в конфигурационном файле уже был ранее указан путь к crl.pem, то службу можно не перезапускать, OpenVPN перечитывает CRL один раз в час. Но в течении этого часа клиенты с отозванными сертификатами смогут продолжать подключаться и работать.

Для клиента с отозванным сертификатом процесс подключения будет «зависать». В логе можно увидеть:

TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
TLS Error: TLS handshake failed

Чтобы клиент не стучался постоянно на сервер, у него в конфиге есть опция:

connect-retry-max 25

Передать эту опцию при отзыве сертификата нельзя, поэтому указывайте её всем клиентам заранее.

Ссылки

OpenVPN 2.5.1 сервер на Windows

Обновлено Обновлено:
Опубликовано Опубликовано:

OpenVPN позволяет настроить VPN-сервер как на платформе Windows Server, так и версии для рабочего компьютера (Windows 10, 8, 7).

Установка сервера
Создание сертификатов
Настройка OpenVPN
Настройка клиента
Доступ к локальной сети
Решение проблем

Установка OpenVPN Server

Переходим на официальный сайт OpenVPN и скачиваем последнюю версию программы для соответствующей версии Windows:

Скачиваем OpenVPN для Windows

Запускаем скачанный файл — нажимаем NextI Agree — и выставляем галочку EasyRSA 2/3 Certificate Management Scripts (нужен для возможности сгенерировать сертификаты):

Во время установки, ставим галочку EasyRSA 2 Certificate Management Scripts

* интерфейсы для старой версии OpenVPN и новой немного различаются. Нам нужно выбрать для установки все пункты.

… снова Next и Install — начнется установка. В процессе мастер может выдать запрос на подтверждение установки виртуального сетевого адаптера — соглашаемся (Install/Установить).

После завершения нажимаем Next — снимаем галочку Show ReadmeFinish.

Создание сертификатов

Новая версия OpenVPN позволяет создавать сертификаты на основе Easy RSA 3, старая работает на базе 2-й версии. Наши действия будут различаться в зависимости от данной версии. Рассмотрим процесс формирования сертификата с использованием как RSA3, так и RSA2.

а) Создание сертификатов с RSA 3

1. Переходим в папку установки OpenVPN (по умолчанию, C:\Program Files\OpenVPN) и создаем каталог ssl.

2. После переходим в папку C:\Program Files\OpenVPN\easy-rsa, переименовываем файл vars.example в vars, открываем его на редактирование и правим одну строку:

set_var EASYRSA_TEMP_DIR «$EASYRSA_PKI/temp»

* мы снимаем комментарий и добавляем temp в конце $EASYRSA_PKI. Если это не сделать, то при попытке сформировать корневого сертификата мы получим ошибку Failed create CA private key.

3. Запускаем командную строку от имени администратора:

Запуск командной строки от имени администратора

4. Переходим в каталог easy-rsa:

cd %ProgramFiles%\OpenVPN\easy-rsa

5. Запускаем команду:

EasyRSA-Start.bat

Мы окажемся в среде EasyRSA Shell.

6. Инициализируем PKI:

./easyrsa init-pki

Если система вернет ошибку, выходим из оболочки EasyRSA Shell:

exit

И заходим снова:

EasyRSA-Start.bat

Мы должны увидеть:

init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: C:/Program Files/OpenVPN/easy-rsa/pki

7. Генерируем корневой сертификат (CA):

./easyrsa build-ca

… после ввода Enter обязательно задаем пароль дважды. На запрос ввести Common Name можно просто нажать ввод или написать свое имя:

Common Name (eg: your user, host, or server name) [Easy-RSA CA]:

8. Создаем ключ Диффи-Хеллмана:

./easyrsa gen-dh

9. Для создания сертификата сервера необходимо сначала создать файл запроса:

./easyrsa gen-req cert nopass

* на запрос ввода Common Name просто вводим Enter.

… и на его основе — сам сертификат:

./easyrsa sign-req server cert

После ввода команды подтверждаем правильность данных, введя yes:

  Confirm request details: yes

… и вводим пароль, который указывали при создании корневого сертификата.

10. Сертификаты сервера готовы и находятся в каталоге pki. Переносим в C:\Program Files\OpenVPN\ssl следующие файлы:

  • ca.crt
  • issued/cert.crt
  • private/cert.key
  • dh.pem

б) Создание сертификатов с RSA 2 (для старых версий OpenVPN)

1. Переходим в папку установки OpenVPN (по умолчанию, C:\Program Files\OpenVPN) и создаем каталог ssl.

2. После переходим в папку C:\Program Files\OpenVPN\easy-rsa, создаем файл vars.bat, открываем его на редактирование и приводим к следующему виду:

set «PATH=%PATH%;%ProgramFiles%\OpenVPN\bin»
set HOME=%ProgramFiles%\OpenVPN\easy-rsa
set KEY_CONFIG=openssl-1.0.0.cnf
set KEY_DIR=keys
set KEY_SIZE=2048
set KEY_COUNTRY=RU
set KEY_PROVINCE=Sankt-Petersburg
set KEY_CITY=Sankt-Petersburg
set KEY_ORG=Organization
set KEY_EMAIL=master@dmosk.ru
set KEY_CN=DMOSK
set KEY_OU=DMOSK
set KEY_NAME=server.domain.ru
set PKCS11_MODULE_PATH=DMOSK
set PKCS11_PIN=12345678

* в каталоге easy-rsa уже есть файл vars.bat.sample — можно переименовать и использовать его.
** значение HOME не меняем, если оставили путь установки программы по умолчанию; KEY_DIR — каталог, куда будут генерироваться сертификаты; KEY_CONFIG может быть разным — его лучше посмотреть в файле vars.bat.sample или по названию соответствующего файла в папке easy-rsa; KEY_NAME желательно, чтобы соответствовал полному имени VPN-сервера; остальные опции можно заполнить произвольно.

3. Запускаем командную строку от имени администратора:

Запуск командной строки от имени администратора

4. Переходим в каталог easy-rsa:

cd %ProgramFiles%\OpenVPN\easy-rsa

4. Запускаем vars.bat:

vars.bat

5. Чистим каталоги от устаревшей информации:

clean-all.bat

* данная команда выполняется один раз, когда на сервере нет информации по ранее созданным сертификатам.

6. Снова запускаем vars.bat (после clean переопределяются некоторые переменные):

vars.bat

Переходим к созданию ключей.

7. Генерируем последовательность центра сертификации:

build-ca.bat

На все запросы нажимаем Enter.

8. Запускаем build-dh.bat (сертификат с использованием алгоритма Диффи-Хеллмана):

openssl dhparam -out keys\dh.pem 2048

* команда может выполняться долго — это нормально.

9. Генерируем сертификат для сервера:

build-key-server.bat cert

* где cert — имя сертификата; на все запросы нажимаем Enter. В конце подтверждаем два раза корректность информации вводом y.

10. После переносим из папки C:\Program Files\OpenVPN\easy-rsa\keys в C:\Program Files\OpenVPN\ssl следующие файлы:

  • ca.crt
  • cert.crt
  • cert.key
  • dh.pem

Настройка сервера

Переходим в папку C:\Program Files\OpenVPN\config-auto (или для старой версии C:\Program Files\OpenVPN\config) и создаем файл server.ovpn. Открываем его на редактирование и приводим к следующему виду:

port 443
proto udp
dev tun
dev-node «VPN Server»
dh «C:\\Program Files\\OpenVPN\\ssl\\dh.pem»
ca «C:\\Program Files\\OpenVPN\\ssl\\ca.crt»
cert «C:\\Program Files\\OpenVPN\\ssl\\cert.crt»
key «C:\\Program Files\\OpenVPN\\ssl\\cert.key»
server 172.16.10.0 255.255.255.0
max-clients 32
keepalive 10 120
client-to-client
compress
fast-io
cipher AES-256-GCM
persist-key
persist-tun
status «C:\\Program Files\\OpenVPN\\log\\status.log»
log «C:\\Program Files\\OpenVPN\\log\\openvpn.log»
verb 4
mute 20

* где port — сетевой порт (443 позволит избежать проблем при использовании Интернета в общественных местах, но может быть любым из свободных, например 1194, занятые порты в Windows можно посмотреть командой netstat -a); dev-node — название сетевого интерфейса; server — подсеть, в которой будут работать как сам сервер, так и подключенные к нему клиенты.
** так как в некоторых путях есть пробелы, параметр заносится в кавычках.
*** при использовании другого порта необходимо проверить, что он открыт в брандмауэре или на время тестирования отключить его.

В сетевых подключениях Windows открываем управление адаптерами — TAP-адаптер переименовываем в «VPN Server» (как у нас указано в конфигурационном файле, разделе dev-node):

Переименовываем сетевой интерфейс в Windows

Теперь открываем службы Windows и находим «OpenVpnService». Открываем ее, настраиваем на автозапуск и включаем:

Настраиваем автозапуск OpenVpnService и включаем ее

Если служба в запущенном состоянии, то перезапускаем ее.

Ранее переименованный сетевой интерфейс должен включиться:

Включенный TAP адаптер

VPN-сервер работает. Проверьте, что сетевой адаптер VPN Server получил IP 172.16.10.1. Если он получает что-то, на подобие, 169.254…, выключаем сетевой адаптер — перезапускаем службу OpenVpnService и снова включаем сетевой адаптер.

Если в нашей системе включен брандмауэр, необходимо открыть порт для OpenVPN. Это быстрее всего сделать из командной строки — открываем ее от администратора и вводим:

netsh advfirewall firewall add rule name=»ALLOW OpenVPN» dir=in action=allow protocol=UDP localport=443

* где 443 — наш порт, который мы решили задействовать под OpenVPN; UDP — протокол, который мы настроили в конфигурационном файле сервера.

Настройка клиента

На сервере

На сервере генерируем сертификат для клиента. Для этого сначала чистим файл index.txt в папке C:\Program Files\OpenVPN\easy-rsa\keys.

Затем запускаем командную строку от имени администратора:

Запуск командной строки от имени администратора

Переходим в каталог easy-rsa:

cd %ProgramFiles%\OpenVPN\easy-rsa

Далее наши действия зависят от версии RSA.

а) Создание сертификатов с RSA 3

Запускаем команду:

EasyRSA-Start.bat

Мы окажемся в среде EasyRSA Shell.

Создаем клиентский сертификат:

./easyrsa gen-req client1 nopass

./easyrsa sign-req client client1

Мы должны увидеть запрос на подтверждение намерения выпустить сертификат — вводим yes:

  Confirm request details: yes

* в данном примере будет создан сертификат для client1.

После вводим пароль, который указывали при создании корневого сертификата.

Теперь из папки pki копируем файлы:

  • issued/client1.crt
  • private/client1.key
  • ca.crt
  • dh.pem

… и переносим их на клиентский компьютер.

б) Создание сертификатов с RSA 2 (для очень старых версий OpenVPN)

Запускаем vars.bat:

vars.bat

И генерируем сертификат первого пользователя:

build-key.bat client1

* на все запросы наживаем Enter, кроме Common Name — в данном поле вводим имя клиента (в нашем случае, просто client1). В конце подтверждаем введенную информацию — y.
** На каждого клиента нужно сгенерировать свой сертификат, в противном случае, им будет присваиваться один и тот же IP-адрес, что будет приводить к конфликту.

Получиться, что-то на подобие:

Country Name (2 letter code) [RU]:
State or Province Name (full name) [Sankt-Petersburg]:
Locality Name (eg, city) [Sankt-Petersburg]:
Organization Name (eg, company) [Organization]:
Organizational Unit Name (eg, section) [DMOSK]:
Common Name (eg, your name or your server’s hostname) [DMOSK]:client1
Name [server.domain.ru]:
Email Address [master@dmosk.ru]:

По умолчанию, для Common Name будет подставляться значение из vars.bat — но с ним сертификат не будет создаваться. Необходимо при создании каждого ключа подставлять значение, равное имени сертификата. Например, как выше — подставлено client1.

Теперь из папки keys копируем файлы:

  • client1.crt
  • client1.key
  • ca.crt
  • dh.pem

… и переносим их на клиентский компьютер.

На клиенте

Заходим на официальную страницу загрузки openvpn и скачиваем клиента для Windows:

Скачиваем OpenVPN для Windows

* по сути, это тот же файл, который скачивался для сервера.

Запускаем скачанный файл и устанавливаем программу, нажимая «Далее».

Переходим в папку C:\Program Files\OpenVPN\config. И копируем в нее сертификаты, которые перенесли с сервера.

Теперь открываем блокнот от имени администратора и вставляем следующие строки:

client
resolv-retry infinite
nobind
remote 192.168.0.15 443
proto udp
dev tun
compress
fast-io
cipher AES-256-GCM
ca ca.crt
cert client1.crt
key client1.key
dh dh.pem
float
keepalive 10 120
persist-key
persist-tun
verb 0

* где 192.168.0.15 443 — IP-адрес OpenVPN-сервера и порт, на котором он принимает запросы. Для боевой среды это будет внешний адрес.

Сохраняем файл с именем config.ovpn в папке C:\Program Files\OpenVPN\config.

Запускаем с рабочего стола программу «OpenVPN GUI» от имени администратора (это важно).

Нажимаем правой кнопкой по появившемуся в трее значку и выбираем «Подключиться»:

Запуск подключения openvpn-клиента к серверу

Произойдет подключение и значок поменяет цвет с серого/желтого на зеленый.

Доступ к локальной сети

По инструкции выше мы сможем получить доступ только к серверу, на котором установлен OpenVPN. Для получения доступа ко всей внутренней сети, выполним следующие шаги.

1. Настройка реестра

Для включения IP маршрутизации в Windows необходимо в ветке реестра HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters найти параметр IPEnableRouter и задать ему значение 1. Это можно сделать в утилите редактирования реестра (regedit) или командой:

reg add «HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters» /v IPEnableRouter /t REG_DWORD /d 1 /f

* командную строку необходимо запускать от администратора.

2. Настройка OpenVPN Server

В конфигурационный файл OpenVPN добавим:

push «route 172.16.10.0 255.255.255.0»
push «route 192.168.2.0 255.255.255.0»

* где 172.16.10.0 — VPN сеть; 192.168.2.0 — локальная сеть, в которую необходимо «попасть» пользователям openvpn.

При необходимости использовать DNS внутренней сети также добавим:

push «dhcp-option DNS 192.168.0.15»
push «dhcp-option DNS 192.168.0.16»
push «dhcp-option DOMAIN dmosk.local»

* где 192.168.0.15 и 192.168.0.16 — внутренние DNS-серверы; dmosk.local — домен, который будет добавляться к узлам, обращение к которым идет по неполному имени.

Если нам нужно, чтобы все запросы клиента (в том числе, Интернет) ходили через сервер OpenVPN, добавляем:

push «redirect-gateway def1»

* в таком случае, нам не обязательно добавлять push route, который мы использовали выше.

Перезагружаем службу OpenVpnService.

3. Разрешаем доступ к локальной сети

Заходим в управление сетевыми подключениями (Панель управления\Сеть и Интернет\Сетевые подключения). Кликаем правой кнопкой мыши по адаптеру локальной сети — Свойства:

Открываем свойства сетевого адаптера для локальной сети

На вкладке Доступ ставим галочку Разрешить другим пользователям сети использовать подключение к Интернету данного компьютера:

Скачиваем OpenVPN для Windows

… и сохраняем настройки.

Возможные проблемы

Большая часть проблем решается при помощи логов, которые находятся в папке C:\Program Files\OpenVPN\log. Уровень детализации лога контролируется параметром verb в конфигурационном файле сервера или клиента.

Также возможны следующие часто возникающие проблемы:

  1. Проблема: клиент постоянно пытается подключиться к серверу, но соединения не происходит или подключение зависает.
    Причина: сервер блокирует подключения по настроенному порту VPN (в нашем примере, 443).
    Решение: на сервере необходимо добавить 443 порт в исключения брандмауэра или отключить последний.
     
  2. Проблема: при попытке подключиться к серверу выскакивает ошибка «Не удалось подключиться к config».
    Причина: ошибка в настройках.
    Решение: перепроверьте каждую строчку файла конфигурации. Проверьте наличие всех файлов, на которые ссылаетесь в настройках.
     
  3. Проблема: клиенты получают одинаковые IP-адреса.
    Причина: подключение выполняется под одним и тем же пользователем.
    Решение: сервер выдает одинаковые адреса одинаковым клиентам. Необходимо настроить авторизацию на сервере и выдать каждому клиенту индивидуальные настройки.
     
  4. Проблема: соединение происходит, но через несколько минут связь прерывается.
    Причина: дублирование IP-адресов.
    Решение: данная проблема описана выше (пункт 3).

Возможно, Вы это тоже захотите попробовать

  1. Настройка OpenVPN-сервера с аутентификацией через LDAP (Active Directory) на Ubuntu Server
  2. Установка и настройка OpenVPN на Linux CentOS 7

  • Openvpn connect for windows настройка
  • Openvpn tun driver windows 7
  • Opera mini для компьютера windows 10 скачать бесплатно
  • Openvpn connect for windows download
  • Opera mini windows 10 mobile