Diinstalldevice failed error 536870397

Hi there everyone today I decided to move from version 2.4 to 2.5 but there was a problem with the installation.

12thFactor

OpenVpn Newbie
Posts: 3
Joined: Thu Nov 05, 2020 9:18 pm

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Hi there everyone today I decided to move from version 2.4 to 2.5 but there was a problem with the installation.

On my machine I had version 2.4 previously installed I downloaded the client installer for version 2.5, after I installed it I noticed that another network adapter was also installed alongside TAP-Windows Adapter V9. Surprised by this I decided maybe this was because I have to do a clean install. Consequently, I uninstalled version 2.5 which I had just installed, but still the «OpenVPN Wintun» device remained behind. I decided to remove it using Windows 10 device manager including the driver.

But after that, when I tried to reinstall OpenVPN client 2.5 there was this error message:

OpenVPNMSICA: tap_create_adapter:
DiInstallDevice failed Error — 536870397:

No more explanations!

The resolution:
At first I was frustrated, but after I looked around a bit I figured it out and now I am sharing it here in case anyone else is having similar issues or problems.

Here is what to do: The device being installed which fails obviously is the network adapter, for the new Wintun device. So if you somehow could get it installed your problems would go away. This can be done in two ways:

1- You can simply open up the installer msi but this time choose to customize the installation. and after that select to not install the TAP-Windows6 and Wintun drivers. They are going to get installed, only this time you are not going to receive an error any longer. But obviously you are going to be missing a network interface. In order to take care of that open an Admin level command prompt and cd to OpenVPNbin directory wherever you installed it. and then issue the command:

This will create a network interface which you can remove using:

In such a scenario you will not get your Wintun network adapter back even using the command :

Will produce the error:
DiInstallDevice failed
Error 0xe0000203
Creating TUN/TAP adapter failed (error 0xe0000203)

2- This is the most simple solution and will also get you your Wintun network device back. You have to simply reinstall wireguard https://www.wireguard.com/install/if you have had it previously installed.(remove it and then reinstall it) and after that try installing openvpn again with the derivers and there should be no problems.

Hope this helps anyone who is having similar issues.

Last edited by 12thFactor on Thu Nov 05, 2020 10:18 pm, edited 1 time in total.


TinCanTech

OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by TinCanTech » Thu Nov 05, 2020 10:01 pm

Are you saying that

installing OpenVPN to a Windows PC which already has Wireguard installed causes problems ?


12thFactor

OpenVpn Newbie
Posts: 3
Joined: Thu Nov 05, 2020 9:18 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by 12thFactor » Thu Nov 05, 2020 10:09 pm

TinCanTech wrote: ↑

Thu Nov 05, 2020 10:01 pm


Are you saying that

installing OpenVPN to a Windows PC which already has Wireguard installed causes problems ?

Yes, but quite very possibly not under normal circumstances, only if the driver for wireguard network adapter is not present on the machine or if it is manually removed from a machine that has wiregaurd installed but its driver is removed.
Consider my situation and how that error was produced on my machine.



12thFactor

OpenVpn Newbie
Posts: 3
Joined: Thu Nov 05, 2020 9:18 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by 12thFactor » Thu Nov 05, 2020 11:02 pm

Yes absolutely please feel free to do it, it is not about who would it it is about the problem being solved thanks, please . feel free to report it on github.
I am not on github.


unicornir

OpenVpn Newbie
Posts: 3
Joined: Sat Dec 26, 2020 4:49 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by unicornir » Sat Dec 26, 2020 5:00 pm

Hi!

I have the same problem in my Windows 10 v1607 build:14393.0. I notice this problem when I try to install new version of Windscribe. The installation goes till it reaches to 60%, and after some while it show this message:

An error occurred installing the TAP device driver: 2

Short story, after some digging, I found out the root problem is OpenVPN and I uninstall all of my VPN’s and their TAP drivers also OpenVPN itself. Then try to install OpenVPN v2.5.0 x64 and I got another error message! Then I found out this topic and try this command: «tapctl create» but I get bellow message at CMD (in Admin mode):

tap_create_adapter: DiInstallDevice failed
Error 0x5b4: This operation returned because the timeout period expired.
Creating TUN/TAP adapter failed (error 0x5b4).

Now, I cannot install any of my VPN’s!!! What I have done till now:
1) Uninstall all VPN’s with Revo Uninstaller with their leftovers.
2) Use CCleaner + Disk Clean built-in Windows.
3) Restart many times!
4) Disable Comodo Firewall + Its HIPS completely (I am sure it is not the root of the problem)
5) I do not have «wireguard » as mentioned in the first post!
6) Disable all other network adapters in my network control panel except my main one, before I reinstall OpenVPN. (I found this solution on the net) (I have VMWare v15.5.6)

What can I do to solve this problem!?

Thanks in Advanced


TinCanTech

OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by TinCanTech » Sat Dec 26, 2020 5:08 pm

unicornir wrote: ↑

Sat Dec 26, 2020 5:00 pm


What can I do to solve this problem!?

unicornir wrote: ↑

Sat Dec 26, 2020 5:00 pm


Disable Comodo Firewall + Its HIPS completely

I would uninstall this ..


unicornir

OpenVpn Newbie
Posts: 3
Joined: Sat Dec 26, 2020 4:49 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by unicornir » Sat Dec 26, 2020 9:47 pm

TinCanTech wrote: ↑

Sat Dec 26, 2020 5:08 pm


I would uninstall this ..

Well, as I pointed, Comodo is not a problem! To make sure, I try same Windows 10 Version on VMware virtual machine with Comodo on it and without any problems I could install OpenVPN v2.5.0 and new Windscribe v2.0 beta! So there should be another problem with my main machine Windows 10!!??


TinCanTech

OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by TinCanTech » Sun Dec 27, 2020 2:11 am

«If I have 5 exploding carrots and 3 of them explode then how many exploding pears do I have


unicornir

OpenVpn Newbie
Posts: 3
Joined: Sat Dec 26, 2020 4:49 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by unicornir » Sun Dec 27, 2020 10:11 am

TinCanTech wrote: ↑

Sun Dec 27, 2020 2:11 am


«If I have 5 exploding carrots and 3 of them explode then how many exploding pears do I have

I am seeking for help here :idea: ! and not funny posts! :? :? :? :!: :?:

Is there any Admin’s or OpenVPN programmers checking here!? I post the error message in my message. What can I do to solve the problem and be able to install OpenVPN and Windscribe on my system again.


desbest

OpenVpn Newbie
Posts: 18
Joined: Fri May 18, 2018 8:11 am

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by desbest » Sat Feb 20, 2021 12:32 am

unicornir wrote: ↑

Sun Dec 27, 2020 10:11 am

TinCanTech wrote: ↑

Sun Dec 27, 2020 2:11 am


«If I have 5 exploding carrots and 3 of them explode then how many exploding pears do I have

I am seeking for help here :idea: ! and not funny posts! :? :? :? :!: :?:

Is there any Admin’s or OpenVPN programmers checking here!? I post the error message in my message. What can I do to solve the problem and be able to install OpenVPN and Windscribe on my system again.

I believe that TinCanTech is saying metaphorically and colloquially, that just because something solves part of a problem or fails to solve it in a particular circumstance, doesn’t mean that it cannot solve your problem in your specific circumstance, or there’s no other things to consider to solve the problem completely (ie. your specific circumstance). In your case, your antivirus (Comodo), so you should try out the suggestion given, rather than to say «it works in my virtual machine».



sextant

OpenVpn Newbie
Posts: 10
Joined: Wed Dec 01, 2021 8:29 am

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by sextant » Wed Dec 01, 2021 8:33 am

Hello!
I get exactly the same (== 536870397) error code when trying to install v2.5.4 on vanilla win7/64.
(«vanilla» means — no antiviruses or any other 3rd party code, only the native win7 stuff — untweaked)


TinCanTech

OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by TinCanTech » Wed Dec 01, 2021 1:16 pm

Please post your install log C:Windowsinfsetupapi.dev.log

Only the last few days of it should be enough.


sextant

OpenVpn Newbie
Posts: 10
Joined: Wed Dec 01, 2021 8:29 am

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by sextant » Thu Dec 02, 2021 9:36 am

Sorry for the layout, could not find the «spoiler» tag here…

Code: Select all

[Boot Session: 2021/12/01 10:54:32.407]

>>>  [Device Install (DiInstallDevice) - ROOTNET000]
>>>  Section start 2021/12/01 11:08:17.555
      cmd: C:Windowssystem32MsiExec.exe -Embedding B6D8C0C6854D62B58186741776B67AD1 M GlobalMSI0000
     dvi: Set selected driver complete.
     dvi: Set selected driver complete.
     dvi: {Build Driver List} 11:08:17.556
     dvi:      Searching for hardware ID(s):
     dvi:           wintun
     cpy:      Policy is set to make all digital signatures equal.
     dvi:      Enumerating INFs from path list 'C:Windowsinf'
     inf:      Searched 0 potential matches in published INF directory
     inf:      Searched 35 INFs in directory: 'C:Windowsinf'
     dvi: {Build Driver List - exit(0x00000000)} 11:08:21.304
     dvi: {DIF_SELECTBESTCOMPATDRV} 11:08:21.304
     dvi:      CoInstaller 1: Enter 11:08:21.305
     dvi:      CoInstaller 1: Exit
     dvi:      CoInstaller 2: Enter 11:08:21.305
     dvi:      CoInstaller 2: Exit
     dvi:      CoInstaller 3: Enter 11:08:21.306
     dvi:      CoInstaller 3: Exit
     dvi:      Class installer: Enter 11:08:21.306
     dvi:      Class installer: Exit
     dvi:      Default installer: Enter 11:08:21.307
     dvi:           {Select Best Driver}
!    dvi:                Selecting driver failed(0xe0000228)
     dvi:           {Select Best Driver - exit(0xe0000228)}
!    dvi:      Default installer: failed!
!    dvi:      Error 0xe0000228: There are no compatible drivers for this device.
     dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 11:08:21.403
<<<  Section end 2021/12/01 11:08:21.404
<<<  [Exit status: FAILURE(0xe0000203)]


>>>  [Device Install (DiInstallDevice) - ROOTNET000]
>>>  Section start 2021/12/01 11:10:18.054
      cmd: C:Windowssystem32MsiExec.exe -Embedding 520F59B75410D3C7832A29B1733CD0F5 M GlobalMSI0000
     dvi: Set selected driver complete.
     dvi: Set selected driver complete.
     dvi: {Build Driver List} 11:10:18.055
     dvi:      Searching for hardware ID(s):
     dvi:           wintun
     cpy:      Policy is set to make all digital signatures equal.
     dvi:      Enumerating INFs from path list 'C:Windowsinf'
     inf:      Searched 0 potential matches in published INF directory
     inf:      Searched 35 INFs in directory: 'C:Windowsinf'
     dvi: {Build Driver List - exit(0x00000000)} 11:10:18.140
     dvi: {DIF_SELECTBESTCOMPATDRV} 11:10:18.140
     dvi:      CoInstaller 1: Enter 11:10:18.141
     dvi:      CoInstaller 1: Exit
     dvi:      CoInstaller 2: Enter 11:10:18.141
     dvi:      CoInstaller 2: Exit
     dvi:      CoInstaller 3: Enter 11:10:18.141
     dvi:      CoInstaller 3: Exit
     dvi:      Class installer: Enter 11:10:18.141
     dvi:      Class installer: Exit
     dvi:      Default installer: Enter 11:10:18.142
     dvi:           {Select Best Driver}
!    dvi:                Selecting driver failed(0xe0000228)
     dvi:           {Select Best Driver - exit(0xe0000228)}
!    dvi:      Default installer: failed!
!    dvi:      Error 0xe0000228: There are no compatible drivers for this device.
     dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 11:10:18.143
<<<  Section end 2021/12/01 11:10:18.143
<<<  [Exit status: FAILURE(0xe0000203)]


>>>  [Device Install (Hardware initiated) - USBVID_0483&PID_DF11FFFFFFFEFFFF]
>>>  Section start 2021/12/01 15:19:25.340
     ump: Creating Install Process: DrvInst.exe 15:19:25.374
     ndv: Retrieving device info...
     ndv: Setting device parameters...
     ndv: Searching Driver Store and Device Path...
     dvi: {Build Driver List} 15:19:25.660
     dvi:      Searching for hardware ID(s):
     dvi:           usbvid_0483&pid_df11&rev_2200
     dvi:           usbvid_0483&pid_df11
     dvi:      Searching for compatible ID(s):
     dvi:           usbclass_fe&subclass_01&prot_02
     dvi:           usbclass_fe&subclass_01
     dvi:           usbclass_fe
     cpy:      Policy is set to make all digital signatures equal.
     dvi:      Enumerating INFs from path list 'C:Windowsinf'
     inf:      Searched 0 potential matches in published INF directory
     inf:      Searched 35 INFs in directory: 'C:Windowsinf'
     dvi: {Build Driver List - exit(0x00000000)} 15:19:26.135
     ndv: Selecting best match from Driver Store (including Device Path)...
     dvi: {DIF_SELECTBESTCOMPATDRV} 15:19:26.136
     dvi:      No class installer for 'STM32  BOOTLOADER'
     dvi:      No CoInstallers found
     dvi:      Default installer: Enter 15:19:26.136
     dvi:           {Select Best Driver}
!    dvi:                Selecting driver failed(0xe0000228)
     dvi:           {Select Best Driver - exit(0xe0000228)}
!    dvi:      Default installer: failed!
!    dvi:      Error 0xe0000228: There are no compatible drivers for this device.
     dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 15:19:26.159
     ndv: Searching Windows Update for drivers... 15:19:26.189
     ndv: Acquired WU search serialization mutex. 15:19:26.189
     ndv: About to release WU search serialization mutex. 15:19:26.226
     ndv: No driver found on Windows Update. 15:19:26.226
     ndv: {Core Device Install} 15:19:26.228
!    ndv:      Installing NULL driver!
     dvi:      Set selected driver complete.
     dvi:      {DIF_ALLOW_INSTALL} 15:19:26.229
     dvi:           No class installer for 'STM32  BOOTLOADER'
     dvi:           Default installer: Enter 15:19:26.229
     dvi:           Default installer: Exit
     dvi:      {DIF_ALLOW_INSTALL - exit(0xe000020e)} 15:19:26.230
     dvi:      {DIF_INSTALLDEVICE} 15:19:26.230
     dvi:           No class installer for 'STM32  BOOTLOADER'
     dvi:           Default installer: Enter 15:19:26.231
!    dvi:                Installing NULL driver!
     dvi:                Writing common driver property settings.
     dvi:                {Restarting Devices} 15:19:26.310
     dvi:                     Restart: USBVID_0483&PID_DF11FFFFFFFEFFFF
     dvi:                     Restart complete.
     dvi:                {Restarting Devices exit} 15:19:26.364
     dvi:           Default installer: Exit
     dvi:      {DIF_INSTALLDEVICE - exit(0x00000000)} 15:19:26.365
     ndv:      Device install status=0xe0000203
     ndv:      Performing device install final cleanup...
!    ndv:      Queueing up error report since device installation failed...
     ndv: {Core Device Install - exit(0xe0000203)} 15:19:26.367
     ump: Server install process exited with code 0xe0000203 15:19:26.369
<<<  Section end 2021/12/01 15:19:26.372
<<<  [Exit status: FAILURE(0xe0000203)]


sextant

OpenVpn Newbie
Posts: 10
Joined: Wed Dec 01, 2021 8:29 am

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by sextant » Thu Dec 02, 2021 11:20 am

My attempt to use the solution from the very first post here also failed:

Code: Select all

Microsoft Windows [Version 6.1.7601]
(c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены.

C:PROGRA~1OpenVPNbin>dir
 Том в устройстве C не имеет метки.
 Серийный номер тома: 567A-3901

 Содержимое папки C:PROGRA~1OpenVPNbin

2021-12-02  14:12    <DIR>          .
2021-12-02  14:12    <DIR>          ..
2021-10-20  10:23         3 482 288 libcrypto-1_1-x64.dll
2021-10-20  10:23            93 872 libpkcs11-helper-1.dll
2021-10-20  10:23           694 448 libssl-1_1-x64.dll
2021-10-20  10:23           121 008 lzo2.dll
2021-10-20  10:23           811 696 openvpn-gui.exe
2021-10-20  10:23           840 880 openvpn.exe
2021-10-20  10:23            64 176 openvpnserv.exe
2021-10-20  10:23            37 040 tapctl.exe
2021-09-10  12:24            97 152 vcruntime140.dll
               9 файлов      6 242 560 байт
               2 папок  81 250 205 696 байт свободно

C:PROGRA~1OpenVPNbin>tapctl.exe create
tap_create_adapter: DiInstallDevice failed
Error 0xe0000203
Creating TUN/TAP adapter failed (error 0xe0000203).

C:PROGRA~1OpenVPNbin>



sextant

OpenVpn Newbie
Posts: 10
Joined: Wed Dec 01, 2021 8:29 am

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by sextant » Thu Dec 02, 2021 11:44 am

Too early to rejoice… :(
When I try to establish a tunnel I get the…

Code: Select all

2021-12-02 14:42:11 open_tun
2021-12-02 14:42:11 CreateFile failed on tap-windows6 device: \.Global{1D7A6C47-3E55-4568-A779-F4B4BE2AC5EE}.tap
2021-12-02 14:42:11 MANAGEMENT: Client disconnected
2021-12-02 14:42:11 All tap-windows6 adapters on this system are currently in use or disabled.
2021-12-02 14:42:11 Exiting due to fatal error


TinCanTech

OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by TinCanTech » Thu Dec 02, 2021 1:24 pm

Did you ever get a TAP Adapter to install ? If not, you could try wintun ?


sextant

OpenVpn Newbie
Posts: 10
Joined: Wed Dec 01, 2021 8:29 am

Re: Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solu

Post

by sextant » Thu Dec 02, 2021 4:08 pm

I do not know. I just run the MSI file.
After the KloneBlake’s trick I did not see any error messages during the installation. But the VPN does not work.


Содержание

  1. OpenVPN Support Forum
  2. Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution
  3. Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution
  4. OpenVPN Support Forum
  5. Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution
  6. Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution
  7. OpenVPN Support Forum
  8. Can’t install OpenVpn
  9. Can’t install OpenVpn
  10. Re: Can’t install OpenVpn
  11. Re: Can’t install OpenVpn
  12. tap_create_adapter: DinstallDevice failed error about openvpn-build HOT 3 OPEN
  13. Comments (3)
  14. Related Issues (20)
  15. Recommend Projects
  16. React
  17. Vue.js
  18. Typescript
  19. TensorFlow
  20. Django
  21. Laravel
  22. Recommend Topics
  23. javascript
  24. server
  25. Machine learning
  26. Visualization
  27. Recommend Org
  28. Facebook
  29. Microsoft
  30. Почему не устанавливается драйвер для penvpn(tap-windows)?

OpenVPN Support Forum

Community Support Forum

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Post by 12thFactor » Thu Nov 05, 2020 9:53 pm

Hi there everyone today I decided to move from version 2.4 to 2.5 but there was a problem with the installation.

On my machine I had version 2.4 previously installed I downloaded the client installer for version 2.5, after I installed it I noticed that another network adapter was also installed alongside TAP-Windows Adapter V9. Surprised by this I decided maybe this was because I have to do a clean install. Consequently, I uninstalled version 2.5 which I had just installed, but still the «OpenVPN Wintun» device remained behind. I decided to remove it using Windows 10 device manager including the driver.

But after that, when I tried to reinstall OpenVPN client 2.5 there was this error message:

OpenVPNMSICA: tap_create_adapter:
DiInstallDevice failed Error — 536870397:

No more explanations!

The resolution:
At first I was frustrated, but after I looked around a bit I figured it out and now I am sharing it here in case anyone else is having similar issues or problems.

Here is what to do: The device being installed which fails obviously is the network adapter, for the new Wintun device. So if you somehow could get it installed your problems would go away. This can be done in two ways:

1- You can simply open up the installer msi but this time choose to customize the installation. and after that select to not install the TAP-Windows6 and Wintun drivers. They are going to get installed, only this time you are not going to receive an error any longer. But obviously you are going to be missing a network interface. In order to take care of that open an Admin level command prompt and cd to OpenVPNbin directory wherever you installed it. and then issue the command:

Will produce the error:
DiInstallDevice failed
Error 0xe0000203
Creating TUN/TAP adapter failed (error 0xe0000203)

2- This is the most simple solution and will also get you your Wintun network device back. You have to simply reinstall wireguard https://www.wireguard.com/install/if you have had it previously installed.(remove it and then reinstall it) and after that try installing openvpn again with the derivers and there should be no problems.

Hope this helps anyone who is having similar issues.

Источник

OpenVPN Support Forum

Community Support Forum

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Post by 12thFactor » Thu Nov 05, 2020 9:53 pm

Hi there everyone today I decided to move from version 2.4 to 2.5 but there was a problem with the installation.

On my machine I had version 2.4 previously installed I downloaded the client installer for version 2.5, after I installed it I noticed that another network adapter was also installed alongside TAP-Windows Adapter V9. Surprised by this I decided maybe this was because I have to do a clean install. Consequently, I uninstalled version 2.5 which I had just installed, but still the «OpenVPN Wintun» device remained behind. I decided to remove it using Windows 10 device manager including the driver.

But after that, when I tried to reinstall OpenVPN client 2.5 there was this error message:

OpenVPNMSICA: tap_create_adapter:
DiInstallDevice failed Error — 536870397:

No more explanations!

The resolution:
At first I was frustrated, but after I looked around a bit I figured it out and now I am sharing it here in case anyone else is having similar issues or problems.

Here is what to do: The device being installed which fails obviously is the network adapter, for the new Wintun device. So if you somehow could get it installed your problems would go away. This can be done in two ways:

1- You can simply open up the installer msi but this time choose to customize the installation. and after that select to not install the TAP-Windows6 and Wintun drivers. They are going to get installed, only this time you are not going to receive an error any longer. But obviously you are going to be missing a network interface. In order to take care of that open an Admin level command prompt and cd to OpenVPNbin directory wherever you installed it. and then issue the command:

Will produce the error:
DiInstallDevice failed
Error 0xe0000203
Creating TUN/TAP adapter failed (error 0xe0000203)

2- This is the most simple solution and will also get you your Wintun network device back. You have to simply reinstall wireguard https://www.wireguard.com/install/if you have had it previously installed.(remove it and then reinstall it) and after that try installing openvpn again with the derivers and there should be no problems.

Hope this helps anyone who is having similar issues.

Источник

OpenVPN Support Forum

Community Support Forum

Can’t install OpenVpn

Can’t install OpenVpn

Post by heinsenberg82 » Wed Jun 30, 2021 5:09 pm

I’m not able to install OpenVPN on a specific machine with Windows 10, due to an error with the TAP driver.

I managed to custom install OpenVPN without Wintap drivers. When I try to run the following commands, these are the errors I get:

Ps: no tap interface is shown on my network interfaces, neither on Device Manager.

I’ve already tried every tip on every forums on internet, but couldn’t manage to find a solution. Any help would be appreciated, thanks!

Re: Can’t install OpenVpn

Post by TinCanTech » Wed Jun 30, 2021 6:57 pm

Re: Can’t install OpenVpn

Post by yfag » Tue Nov 02, 2021 2:56 pm

I have the same problem but I cannot use the official installer

I am using a compiled version for windows because I will have to implement openssl engines.

My server log:
2021-11-02 15:51:30 WARNING: —topology net30 support for server configs with IPv4 pools will be removed in a future release. Please migrate to —topology subnet as soon as possible.
2021-11-02 15:51:30 DEPRECATED OPTION: —cipher set to ‘AES-256-CBC’ but missing in —data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore —cipher for cipher negotiations. Add ‘AES-256-CBC’ to —data-ciphers or change —cipher ‘AES-256-CBC’ to —data-ciphers-fallback ‘AES-256-CBC’ to silence this warning.
2021-11-02 15:51:30 OpenVPN 2.5.3 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Oct 27 2021
2021-11-02 15:51:30 Windows version 10.0 (Windows 10 or greater) 64bit
2021-11-02 15:51:30 library versions: OpenSSL 1.1.1k 25 Mar 2021, LZO 2.10
2021-11-02 15:51:30 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
2021-11-02 15:51:31 Diffie-Hellman initialized with 2048 bit key
2021-11-02 15:51:31 interactive service msg_channel=0
2021-11-02 15:51:31 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 I=16 HWADDR=7c:76:35:bb5d
2021-11-02 15:51:31 open_tun
2021-11-02 15:51:31 There are no TAP-Windows nor Wintun adapters on this system. You should be able to create an adapter by using tapctl.exe utility.
2021-11-02 15:51:31 Exiting due to fatal error

So if I want to create a tap interface on my own:
tap_create_adapter: DiInstallDevice failed
Error 0xe0000203
Creating TUN/TAP adapter failed (error 0xe0000203).

Источник

tap_create_adapter: DinstallDevice failed error about openvpn-build HOT 3 OPEN

I’m also getting this error. I had OpenVPN 2.5.3 previously installed on this system a year ago. Now I need OpenVPN again and I can’t install 2.5.7 because of this error.

mattock commented on January 16, 2023

Can you try manually removing all traces of any previous tap-windows6 adapters as outlined here in the Debugging section:

Inverness commented on January 16, 2023

Can you try manually removing all traces of any previous tap-windows6 adapters as outlined here in the Debugging section:

I wanted to add that the error only appears when selecting to install the Wintun driver. When I select only the Tap driver, installation is successful.

  • Cannot build v2.5.1 due to a missing lz4.h file HOT 6
  • DISABLESAVEPWD not working HOT 1
  • generic build for Windows does not build openvpnserv2.exe HOT 1
  • Launch on user logon setting lost on upgrade HOT 6
  • Building 2.6_git for Windows with NSIS fails for openvpn.8.html HOT 5
  • fail to build on any macos/linux HOT 5
  • Windows NSIS installer and Easy-RSA 3 HOT 2
  • mingw builds HOT 6
  • Build Openvpn on a 64 bit windows host for a 32 bit windows target HOT 4
  • Configure OpenSSL while Building HOT 9
  • [Feature] Make the Docker image official HOT 7
  • netcfginstanceid registry value failed HOT 1
  • Build failed 2.5.8 HOT 4
  • PLAP not in released MSI HOT 2
  • Typo in latest build for macOS HOT 1
  • centos 7 gcc: error: lz4-exe.o: 没有那个文件或目录 HOT 6
  • Hard coded path in openvpn-plap-install.reg HOT 2
  • Installer — Enable multilanguage installer HOT 3
  • libopenvpn_plap.dll is not signed

Recommend Projects

React

A declarative, efficient, and flexible JavaScript library for building user interfaces.

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Typescript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

TensorFlow

An Open Source Machine Learning Framework for Everyone

Django

The Web framework for perfectionists with deadlines.

Laravel

A PHP framework for web artisans

Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

javascript

JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

Some thing interesting about web. New door for the world.

server

A server is a program made to process requests and deliver data to clients.

Machine learning

Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

Visualization

Some thing interesting about visualization, use data art

Some thing interesting about game, make everyone happy.

Recommend Org

Facebook

We are working to build community through open source technology. NB: members must have two-factor auth.

Microsoft

Open source projects and samples from Microsoft.

Источник

Почему не устанавливается драйвер для penvpn(tap-windows)?

Пытаюсь на windows 7 поставить openvpn client, при установке возникает ошибка «error occurred installing the TAP device driver»
Лог установщика:
We are running on a 64-bit system.
Output folder: C:Program FilesTAP-Windowsbin
Extract: devcon.exe. 100%
Output folder: C:Program FilesTAP-Windowsdriver
Extract: OemWin2k.inf. 100%
Extract: tap0901.cat. 100%
Extract: tap0901.sys. 100%
Output folder: C:Program FilesTAP-Windows
Extract: license.txt. 100%
Extract: icon.ico. 100%
devcon.exe hwids returned: 0
TAP install (tap0901) (May require confirmation)
Device node created. Install is complete when drivers are installed.
Updating drivers for tap0901 from C:Program FilesTAP-WindowsdriverOemWin2k.inf.
devcon.exe failed.
devcon.exe returned: 2
devcon.exe cumulative status: 2
Created uninstaller: C:Program FilesTAP-WindowsUninstall.exe
Completed

Как я понял devcon.exe это какая-то очередная мелкософтская софтина для установки драйверов при этом не штатная(не из коробки).
По итогу установки остается только драйвер и бинарник devcon.exe
Пробовал запускать бинарник из командной строки от админа
devcon.exe install «OemWin2k.inf» «C:Program FilesTAP-Windowsdriver»
devcon.exe failed.
Пробовл через штатный установщик драйверов hdwwiz — произошла ошибка.
Пробовал отключать проверку цифровой подписи. Не помогло.
Хвост логов C:Windowsinfsetupapi.dev.log здесь https://pastebin.com/AGPxKMMQ
Пробовал запускать исправление неполадок, скачивать уйму майкрософтским программ для устранения ошибок — ругаются на некоторые драйверы или пытаюся исправить, но по-какой-то причине не могут(пытаются обновить драйвер и не находят в системе, либо вероятно находят, но коротко сообщают — «отказ»).
До этого на машине стоял VMware и VirtualBox и очень замусорили систему своими виртуальными устройствами. Была ситуация, когда стим переставал обновляться из-за большого количества сетевых устройств(около 20). Решилась отключением этих устройств. В настоящий момент оба виртуализатора удалены, видимых лишних сетевых устройств в «изменение параметров адапетра» нет(осталось 4 шт). В диспечере устройств осталось несколько драйверов и неопознанных устройств, но что с ними можно сделать, если они штатно не обновляются.

Предложите как это можно решить(само собой без переустановки винды), где можно посмотреть причину(где логи, Лебовски?).

  • Вопрос задан более трёх лет назад
  • 5168 просмотров

Отключил проверку подписей сертификатов при загрузке(до этого отключал политикой), поудалял какие смог устройства, оставшиеся от виртуалок(vmware, virtualbxox+один из интерфейсов ISATAP), поломал, потом повосстанавливал реестр(HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNetwork), неудачно попытался воспользоваться certutils, подробно поизучал логи. В итоге
tap-windows-9.9.2_3 так и не заработал — устройство появилось в диспечере устройств неопознанным, писало, что устройство не подключено.
openvpn-install-2.3.13-I601-x86_64 установил драйвер, ошибок не показывал, но т.к. драйвер не подписан, то работало только при отключении проверки сертификтов при загрузке, но работает! Проверил, успешно подключается, интерфейс есть.

Т.е. похоже все дело из-за подписи. Надо подумать как заставить драйвер работать в обычном режиме(в нем подпись проверяется, драйвер соответственно не работает и TAP адаптер среди сетевых интерфейсов в центре управления сетями пропал). Вроде можно самим подписать.

Перестал работать и в режиме без проверки подписей драйверов(не знаю почему).
Дрова самоподписанным сертификатов подписать не смог(возможно что то не так делал), но сертификаты итак лежат в доверенных издателях(видимо после галочки «всегда доверять этому издатели» при установке драйвера).
Переустановка не помогла.
Удаление пакетов через
pnputil.exe -e
pnputil.exe -d Oem#.inf (где# номер тап драйвера и драйверов виртуальных машин)
не помогла.
Виндовое устранение неисправностей не помогло.
Помог поиск по реестру по ROOTNET000 (упоминается в ошибке).
Находится в одной из папок реестра, где лежит и значение «Подключение по локальной сети 3″(которого давно нет).
Помогло удаление всех (трех) папок реестра с этим значением. Пример одного из них:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESYSTEMControlSet001ControlNetwork<4d36e972-e325-11ce-bfc1-08002be10318><54e4a266-cf20-4c30-9a05-a7fb94045197>Connection]
«DefaultNameResourceId»=dword:0000070a
«DefaultNameIndex»=dword:00000003
«Name»=»Подключение по локальной сети 3»
«PnpInstanceID»=»ROOT\NET\0000»
«MediaSubType»=dword:00000000

После этого все заработало.
Вопрос можно считать закрытым. Похоже при адекватном использовании и современная винда(юзерферйндли, ага) должна быть переустановлена каждые полгода(а потому должна умереть). Привожу сюда (только) ошибки из лога, чтобы они проиндексировалась в поисковике.
! sig: Verifying file against specific (valid) catalog failed! (0x800b0109)
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
! inf: Package was already in store: skipping Driver Store add
! sig: Verifying file against specific (valid) catalog failed! (0x800b0109)
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
! sig: Verifying file against specific (valid) catalog failed! (0x800b0109)
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
! inf: Empty Section! [tap0901.files]
! sig: VerifyTrustFailed for C:Windowssystem32DRIVERStap0901.sys.
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
. cci: NdisCoinst:NcipCreatePersistedInterface DeviceIoControl failed with error 0x1f
. cci: NdisCoinst: NcipCreatePersistentInterface failed with error 0x1f
. dvi: CoInstaller 1: failed(0x0000001f)!
. dvi: Error 31: A device attached to the system is not functioning.
. ndv: Error(0000001f) installing device!
! ndv: Queueing up error report since device installation failed.
! ndv: Installing NULL driver!
! cci: !NCI: IfType Present, NetLuidIndex NOT Present. pszPnpID= ROOTNET000
. dvi: Error obtaining device ID!
. dvi: Cleaning up failed installation (00000006)
! dvi: Failed to set Config Flags property: 0x00000020
! dvi: Error 0xe000020b: The device instance does not exist in the hardware tree.
. dvi: Default installer: failed!
. dvi: Error 6: The handle is invalid.
! dvi: Driver list already built
. dvi: Class installer: failed(0xe000020b)!
. dvi: Error 0xe000020b: The device instance does not exist in the hardware tree.

Источник

OpenVPN Support Forum

Community Support Forum

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Error during installation of windows client OpenVPN 2.5.0 amd64 OpenVPNMSICA tap_create_adapter Error 536870397 solution

Post by 12thFactor » Thu Nov 05, 2020 9:53 pm

Hi there everyone today I decided to move from version 2.4 to 2.5 but there was a problem with the installation.

On my machine I had version 2.4 previously installed I downloaded the client installer for version 2.5, after I installed it I noticed that another network adapter was also installed alongside TAP-Windows Adapter V9. Surprised by this I decided maybe this was because I have to do a clean install. Consequently, I uninstalled version 2.5 which I had just installed, but still the «OpenVPN Wintun» device remained behind. I decided to remove it using Windows 10 device manager including the driver.

But after that, when I tried to reinstall OpenVPN client 2.5 there was this error message:

OpenVPNMSICA: tap_create_adapter:
DiInstallDevice failed Error — 536870397:

No more explanations!

The resolution:
At first I was frustrated, but after I looked around a bit I figured it out and now I am sharing it here in case anyone else is having similar issues or problems.

Here is what to do: The device being installed which fails obviously is the network adapter, for the new Wintun device. So if you somehow could get it installed your problems would go away. This can be done in two ways:

1- You can simply open up the installer msi but this time choose to customize the installation. and after that select to not install the TAP-Windows6 and Wintun drivers. They are going to get installed, only this time you are not going to receive an error any longer. But obviously you are going to be missing a network interface. In order to take care of that open an Admin level command prompt and cd to OpenVPNbin directory wherever you installed it. and then issue the command:

Will produce the error:
DiInstallDevice failed
Error 0xe0000203
Creating TUN/TAP adapter failed (error 0xe0000203)

2- This is the most simple solution and will also get you your Wintun network device back. You have to simply reinstall wireguard https://www.wireguard.com/install/if you have had it previously installed.(remove it and then reinstall it) and after that try installing openvpn again with the derivers and there should be no problems.

Hope this helps anyone who is having similar issues.

Источник

OpenVPN Support Forum

Community Support Forum

Client installation on Windows 7 doesn’t worked

Client installation on Windows 7 doesn’t worked

Post by Yazur » Fri Apr 09, 2021 10:21 am

Remote installation failed on the device: Wintun error: Failed to install driver: The publisher of a signed catalog Authenticode(tm) is not yet defined as approved. (Code 0xE0000242)

The installation under Windows 10 works well, but not under Windows 7.

WINDOWS 64-BIT MSI INSTALLER «openvpn-2.5.1-i601-amd64.msi»

Re: Client installation on Windows 7 doesn’t worked

Post by Yazur » Fri Apr 09, 2021 10:34 am

I’m trying this out :

Set it to «Ignore»:

User Configuration ->Administrative Templates -> System -> Driver Installation -> Code signing for drivers

Re: Client installation on Windows 7 doesn’t worked

Post by Yazur » Fri Apr 09, 2021 3:59 pm

Re: Client installation on Windows 7 doesn’t worked

Post by TinCanTech » Fri Apr 09, 2021 5:39 pm

Re: Client installation on Windows 7 doesn’t worked

Post by Yazur » Fri Apr 09, 2021 9:44 pm

Re: Client installation on Windows 7 doesn’t worked

Post by TinCanTech » Fri Apr 09, 2021 10:41 pm

I would think that you can either drop your requirement for fully digitally signed device drivers
or wait for Openvpn to fully digitally sign the TAP driver ..

Or do what I did and DITCH Microsoft completely ..

Re: Client installation on Windows 7 doesn’t worked

Post by Yazur » Sun Apr 11, 2021 11:55 am

I don’t want the TAP driver to be signed but I want to deploy OpenVPN on Windows 7 computers.

I think I’m not the only one trying to do this?

Re: Client installation on Windows 7 doesn’t worked

Post by 300000 » Sun Apr 11, 2021 10:20 pm

Re: Client installation on Windows 7 doesn’t worked

Post by TinCanTech » Sun Apr 11, 2021 10:45 pm

Win7 supports openvpn 2.5

Re: Client installation on Windows 7 doesn’t worked

Post by Yazur » Mon Apr 12, 2021 8:43 am

I was able to get OpenVPN to work regardless of the version on Windows 7 but with a manual installation.
I had to accept the use of the unsigned TAP driver for it to work.

Except that by deployment, I can’t install the TAP driver.

«Wintun error: Failed to install driver: The publisher of a signed catalog Authenticode(tm) is not yet defined as approved. (Code 0xE0000242)»

I have as explained in other posts, tried the GPO to ignore the fact that a driver is not signed, but no change.

Источник

Ошибка OpenVPN: All TAP-Windows adapters are currently in use

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

Вы можете увидеть эту ошибку логе OpenVPN сервера (файл C:Program FilesOpenVPNlogopenvpn.log) или в клиенте OpenVPN GUI/

Это известная ошибка, связанная с тем что в Windows не установлены или некорректно работают виртуальные сетевые адаптеры TAP или wintun.

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

Вы можете включить и отключить сетевой адаптер WinTap из панели управления ncpa.cpl или с помощью такого скрипта PowerShell:

$TapAdapter= Get-NetAdapter| where <$_.InterfaceDescription -like «*TAP-Windows*»>
Disable-NetAdapter -Name $TapAdapter -Confirm:$false
Enable-NetAdapter -Name $TapAdapter -Confirm:$false

В редких случаях нужно переустановить виртуальный адаптер TAP вручную. Последнюю версию TAP драйвера для Windows можно скачать здесь (http://build.openvpn.net/downloads/releases/) . Например, tap-windows-9.24.5.zip.

Перед установкой нужно удалить существующий сетевой адаптер TAP и его драйвер. Для этого запустите программу C:Program FilesTAP-WindowsUninstall.exe.

Для установки TAP драйвера используется утилита tapinstall.exe.

Распакуйте архив и запустите установочный файл с правами администратора.

Обязательно проверьте, что новый сетевой адаптер TAP-Windows Adapter появился в списке сетевых подключения в панели управления Windows (консоль ncpa.cpl ).

Вы этом случае можно создать дополнительный WinTap сетевой адаптер с помощью скрипта (bat файл) %ProgramFiles%TAP-Windowsbinaddtap.bat.

В результате в панели управления появится два (или более) сетевых адаптеров TAP-Windows Adapter V9, и вы сможете одновременно установить несколько одновременных OpenVPN сессий с разными серверами.

Источник

OpenVPN 2.5.1 сервер на Windows

Вчера обнаружил, что на мой домашний сервер пытаются подобрать пароль к RDP. Спросил наших безопасников с работы, да, порт сканировали, но пароль подбирают не они. Надо что-то делать с этим, и я даже знаю что.

Ударим шифрованием по злобным брутфорсерам! Ставим OpenVPN 2.5.1 сервер на Windows Server 2016.

  • Встретимся с Easy-RSA 3.
  • Решим неочевидный баг с директорией временных файлов.
  • Освоим OpenVPN Connect, в том числе на Android.
  • Запилим адаптер OpenVPN WinTun.

Установка OpenVPN Server

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

Доступна версия OpenVPN 2.5.1. Скачиваю Windows 64-bit MSI installer, файл OpenVPN-2.5.1-I601-amd64.msi.

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

Открывается мастер установки, предлагают выбрать тип установки, естественно, нажимаем Customize. Установка по умолчанию нас не устроит.

OpenVPN GUI отключаю. Мне нужно, чтобы OpenVPN на сервере работал автоматически.

А OpenVPN Service, наоборот, включаю. OpenVPN у меня будет работать как служба Windows.

Документацию и примеры конфигурации оставляю. Конфигурационные примеры будут использоваться в качестве шаблонов.

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

ПРИМЕЧАНИЕ: для включения драйвера Wintun необходимо в файле конфигурации сервера включить параметр:

Утилиты OpenSSL EasyRSA 3 Certificate Management Scripts включаю. Install Now.

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

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

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

После установки у нас появляется новый сетевой адаптер Wintun Userspace Tunnel.

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

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

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

Для работы в Windows нас интересует файл EasyRSA-Start.bat.

Запускается оболочка EasyRSA Shell.

Инициализируем новую конфигурацию:

Появляется новая директория C:Program FilesOpenVPNeasy-rsapki.

Генерируем ключ и сертификат центра сертификации. Внимание, сейчас мы наступим на грабли, исправим ошибку и снова вернёмся к генерации файлов для центра сертификации.

Нас попросят для раза ввести пароль. Придумываем и вводим.

Extra arguments given.
genrsa: Use -help for summary.

Failed create CA private key

Исправим этот баг. Мне не совсем понятно, почему нельзя было всё сделать сразу по-человечески, чтобы люди не встречали эту ошибку. Копируем файл C:Program FilesOpenVPNeasy-rsavars.example, называем копию C:Program FilesOpenVPNeasy-rsavars.

Редактируем C:Program FilesOpenVPNeasy-rsavars. В данном файле можно много чего прописать, но я не буду на этом сейчас останавливаться подробно. Находим строку:

И заменяем её на:

Собственно, ошибка и заключалась в том, что оболочка по какой-то причине не могла создать временный файл.

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

Нас попросят для раза ввести пароль. Придумываем и вводим. После нас просят указать Common Name для центра сертификации, указываю «internet-lab.ru».

Операция проходит успешно.

Создаётся сертификат центра сертификации:

Сертификат создаётся на 10 лет, это значение можно переопределить в файле vars.

И ключ центра сертификации:

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

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

Нас просят указать Common Name для сервера, указываю «internet-lab.ru».

Операция проходит успешно.

Создаётся запрос на сертификат сервера:

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

Для создания сертификата сервера нужно подписать запрос на сертификат:

Для подписи нужно ввести слово «yes» и указать пароль от центра сертификации.

Создаётся сертификат сервера:

Сертификат сервера создаётся на 825 дней, это значение можно переопределить в файле vars.

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

Первый

На клиентской машине генерируем запрос на сертификат клиента и ключ без пароля:

  • Переносим REQ файл запроса на сертификат клиента на машину с нашим CA, импортируем, подписываем, отсылаем сгенерированный сертификат CRT обратно клиенту:
  • Второй

    а машине с CA генерируем сертификат клиента и ключ с паролем:

  • Переносим файлы клиенту, сообщаем пароль. Клиент снимает пароль с полученного ключа:
  • Третий

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

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

    Нас просят указать Common Name для клиента, указываю «v.pupkin».

    Операция проходит успешно.

    Создаётся запрос на сертификат клиента:

    Для создания сертификата клиента нужно подписать запрос на сертификат:

    Для подписи нужно ввести слово «yes» и указать пароль от центра сертификации.

    Создаётся сертификат клиента:

    Сертификат сервера создаётся на 825 дней, это значение можно переопределить в файле vars.

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

    Операция займёт некоторое время.

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

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

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

    В папке C:Program FilesOpenVPNbin создаётся файл ta.key.

    Переносим его в папку C:Program FilesOpenVPNeasy-rsapki.

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

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

    Создадим конфигурационный файл сервера C:Program FilesOpenVPNconfig-autoserver.ovpn:

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

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

    У меня здесь указаны пути к ключам и сертификатам, используется порт TCP 1194. Параметр duplicate-cn позволяет подключаться всем клиентам по одному общему сертификату, но это небезопасно и не рекомендуется. Используйте только в тестовых целях. Я использую для того, чтобы с помощью одного и того же сертификата подключиться к OpenVPN серверу и с клиентской машины и со смартфона. Параметр windows-driver wintun подключает использование драйвера WinTun. И что им стоило этот параметр указать в примере конфигурации? Остальное по умолчанию.

    ВНИМАНИЕ: в конфигурационных файлах допускается в путях использование прямого слеша:

    ca «C:/Program Files/OpenVPN/easy-rsa/pki/ca.crt»

    или двойного обратного слеша:

    ca «C:\Program Files\OpenVPN\easy-rsa\pki\ca.crt»

    Запуск OpenVPN сервера

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

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

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

    Запускаем (перезапускаем) службу.

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

    Активировался сетевой адаптер OpenVPN Wintun.

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

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

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

    Настройка firewall

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

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

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

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

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

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

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

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

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

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

    На компьютере клиента устанавливаем OpenVPN Connect.

    Я скачиваю версию для Windows.

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

    OpenVPN Connect устанавливается.

    Установка завершена. Finish.

    На рабочем столе появляется иконка OpenVPN Connect.

    На сервере файл примера конфигурации client.ovpn копируем как internet-lab.ru.ovpn.

    Здесь нужно указать протокол, порт адрес сервера и прочие параметры. Пути к ключам и сертификатам относительные.

    Создаём директорию, например, C:openvpn. Копируем в неё с сервера файлы:

    Запускаем OpenVPN Connect.

    Agree. Переключаемся на File.

    Перетаскиваем мышкой в окно файл C:openvpninternet-lab.ru.ovpn, или указываем через кнопку Browse.

    Ставим галку «Connect after import».

    Соединение с OpenVPN сервером установлено.

    В логах сервера видим, что соединился юзер v.pupkin.

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

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

    Источник

    Понравилась статья? Поделить с друзьями:
  • Digsig error not signed
  • Digital signature verification error cannot find object or property quik
  • Digital display audio не подключено windows 10 на ноутбуке как исправить
  • Digi sm 5100 ошибка формата
  • Digi sm 100 ошибка e3