Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TUN interface DNSDOMAIN missing on Windows11 24H2 #642

Open
MyOrk64 opened this issue Nov 13, 2024 · 3 comments
Open

TUN interface DNSDOMAIN missing on Windows11 24H2 #642

MyOrk64 opened this issue Nov 13, 2024 · 3 comments

Comments

@MyOrk64
Copy link

MyOrk64 commented Nov 13, 2024

OpenVPN is trying to use wmic.exe to configue DNSDOMAIN for tun interfaces.
In Windows 11 wmic is deprecated and can not be added.
This is not working anymore.

Errors are logged:
2024-11-13 07:29:23 WMIC: C:\windows\system32\wbem\wmic.exe nicconfig where (InterfaceIndex=17) call SetDNSDomain 'nothing.net'
2024-11-13 07:29:23 openvpn_execve: CreateProcess C:\windows\system32\wbem\wmic.exe failed: Das System kann die angegebene Datei nicht finden. (errno=2)

  • OS: Windows 11 24H2
  • OpenVPN version: 2.6.12

My personal workaround is an elevated powershell command for setting it up fixed DNSDOMAIN per interface:
Set-DnsClient -InterfaceIndex 17 -ConnectionSpecificSuffix "nothing.net"

@lstipakov
Copy link
Member

Ping @d12fk

@selvanair
Copy link
Contributor

WMI infrastructure is still there but it seems wmic commandline is deprecated -- I think it can be installed manually on Win11 still.
An option is to replace it with the powershell command Set-DnsClient as shown by @MyOrk64 . Is this available on all Win OS versions we support? Win7 compatibility can be broken, probably, but what about some early releases of Win10? Alternative is to edit the registry but I recall some issues with it -- like not immediately effective or some such.

@IAmKrypty
Copy link

Confirming here we ran into the same issue. On a fresh install of Windows 11 24H2, wmic is not installed/enabled, so a user was having DNS issues when connected to our VPN. Using 2.6.12 (and 2.6.13), they would get this error in their Windows client: "TUN: adding dns domain failed using service: The system cannot find the file specified. [status=2 if_name=OpenVPN Wintun]"

We instructed them to install wmic, and everything works again. This does not appear to be an issue if someone upgrades to 24H2 on an existing install, since wmic is likely installed already in those scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants