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

openVPN 2.6.x : Issues with WINS, Netbios fails #373

Closed
ntulm opened this issue Jul 27, 2023 · 2 comments
Closed

openVPN 2.6.x : Issues with WINS, Netbios fails #373

ntulm opened this issue Jul 27, 2023 · 2 comments
Assignees
Milestone

Comments

@ntulm
Copy link

ntulm commented Jul 27, 2023

Hi,

I noticed problems with using the openVPN 2.6.x client on Windows PC (Windows 10).
Prior to this I used version 2.5.9 and everything worked fine.

But since version 2.6.x there are issues with resolving Netbios names and connecting to Samba share via Netbios name fails now.

The openVPN server pushes WINS Server IP to client via dhcp-options but it is no longer registered on Windows client when using version 2.6.x. ipconfig shows WINS-Server is defined with version 2.5.9 but none with version 2.6.x.

Are there any config changes for Netbios support since 2.6?
Or is this feature no longer supported?

@lstipakov lstipakov self-assigned this Jul 27, 2023
@lstipakov lstipakov added the bug label Jul 27, 2023
@lstipakov lstipakov added this to the 2.6.6 milestone Jul 27, 2023
@lstipakov
Copy link
Member

Hi,

What has changed is that starting from 2.6 the default driver is now DCO, which doesn't do DHCP. I just checked the code and it looks like WINS works with DCO only when openvpn doesn't use interactive service. In this case we apply network settings by invoking netsh.exe directly by openvpn process, which runs under elevated privileges:

NETSH: C:\WINDOWS\system32\netsh.exe interface ip set wins 27 static 10.8.0.1

With interactive service (which is the default setup) we modify network settings by the privileged service, while openvpn process is running under limited privileges. Apparently we just lack the code which passes WINS settings from openvpn to the service process. This will be fixed in the next, 2.6.6, release.

Until that (I would say few weeks) if you need WINS you might want to disable DCO by adding disable-dco to the .ovpn profile.

Thanks for reporting this.

@lstipakov lstipakov added the WINS label Jul 27, 2023
@ntulm
Copy link
Author

ntulm commented Jul 28, 2023

Your workaround is working fine. Thanks a lot.

lstipakov added a commit to lstipakov/openvpn that referenced this issue Jul 28, 2023
At the moments WINS servers are set either:

 - via DHCP, which works only for tap-windows6 driver
 - via netsh when running without interactice service

This means that in 2.6 default setup (interactive service and dco)
WINS is silently ignored.

Add WINS support for non-DHCP drivers (like dco) by passing
WINS settings to interactive service and set them there with
netsh call, similar approach as we use for setting DNS.

Fixes OpenVPN#373

Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607
Signed-off-by: Lev Stipakov <lev@openvpn.net>
lstipakov added a commit to lstipakov/openvpn that referenced this issue Jul 31, 2023
At the moments WINS servers are set either:

 - via DHCP, which works only for tap-windows6 driver
 - via netsh when running without interactice service

This means that in 2.6 default setup (interactive service and dco)
WINS is silently ignored.

Add WINS support for non-DHCP drivers (like dco) by passing
WINS settings to interactive service and set them there with
netsh call, similar approach as we use for setting DNS.

Fixes OpenVPN#373

Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607
Signed-off-by: Lev Stipakov <lev@openvpn.net>
lstipakov added a commit to lstipakov/openvpn that referenced this issue Jul 31, 2023
At the moments WINS servers are set either:

 - via DHCP, which works only for tap-windows6 driver
 - via netsh when running without interactice service

This means that in 2.6 default setup (interactive service and dco)
WINS is silently ignored.

Add WINS support for non-DHCP drivers (like dco) by passing
WINS settings to interactive service and set them there with
netsh call, similar approach as we use for setting DNS.

Fixes OpenVPN#373

Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607
Signed-off-by: Lev Stipakov <lev@openvpn.net>
cron2 pushed a commit to cron2/openvpn that referenced this issue Aug 11, 2023
At the moments WINS servers are set either:

 - via DHCP, which works only for tap-windows6 driver
 - via netsh when running without interactice service

This means that in 2.6 default setup (interactive service and dco)
WINS is silently ignored.

Add WINS support for non-DHCP drivers (like dco) by passing
WINS settings to interactive service and set them there with
netsh call, similar approach as we use for setting DNS.

Fixes OpenVPN/openvpn#373

Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20230728131246.694-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26903.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 18826de)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants