-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
No DNS Suffix with DCO if connection initiated through openvpn-gui on windows #326
Comments
n.b., weirdly enough |
As you've mentioned, with
Apparently one can do it with |
As @d12fk pointed out, using that WMI call (or setting value directly in registry |
Yes, that's why it was not included in my original patch using wmic. I'm a bit hazy on the details, but quoting from my commit message (commit 70882f3 for OpenVPN): "DOMAIN-SEARCH is not handled here as wmic only supports I recall having experimented with this and there were some issues with editing the registry -- like the result not immediately effective unless a reset is done etc. |
IIRC, its still possible to do this by editing the registry but one has to do a complicated dance for retaining the previous setting, correctly handling disconnect etc. And each time we've to follow up with a wmic reset call to make the changes effective. That seemed to work though MSDN tells us to reboot after editing this in the registry ! |
Do we know what a wmic reset does behind the scenes? Maybe it's just a WIN32 API call. |
I'm interested in doing this right, because I need it for the --dns option implementation as well. |
I was writing from memory: the idea was to follow up with some dummy wmic call like SetDNSDomain which appeared to "reset" the configuration and make registry changes effective. No idea what API it uses internally. |
@lstipakov -- I'd love to be a contributor, would it be architecturally advisable to try to implement dhcp support in the dco adapter or was dhcp support left off for any particular reason? |
With tap-windows6 it works something like this:
I am a bit reluctant to add this to DCO - most of the network settings could be set from userspace via IPAPI / wmic. @d12fk is working on userspace implementation - search domains could be set via wmic call or registry, but those will be global and replace all other domain resolutions, so this is not a trivial thing. |
@lstipakov appreciate the insight here and certainly don't want to step on anyone's toes. Not to belabor this point, but at least from what I understand this issue is not the first mention or request for this:
|
Ft |
@selvanair @lstipakov I cannot confirm that you need to call wmic reset after editing the registry, at least using Windows 11. In my case it works perfectly just by setting I also don't see any wmic mention in Tailscale TUN interface implementation, they also just set |
Describe the bug
When connecting to openvpn community 2.6.3 from client version 2.6.3, the data channel offload interface does not pick up
DOMAIN-SEARCH
orsearch-domains
suffixes in either the client file or pushed by the serverTo Reproduce
connect to the server using client 2.6.3 and the following configuration file on windows.
Expected behavior
windows DCO adapter search suffix should be set properly with the specified domain search suffixes after successful connection
Version information (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: