Open pfromme25 opened 1 year ago
2023-01-27 13:56:47 NOTE: GetBestInterfaceEx returned error: Element nicht gefunden. (code=1168)
That says that OpenVPN cannot determine a route to the IP that was queried. To diagnose this is a log without masked IPs and a route table before OpenVPN was started is probably needed (ie route print
and I think openvpn has also a commadn to show its view of the routes)
I debugged a bit more into my problem as the line you described also pops up when using disable-dco on 2.6.0 and on our working systems with 2.5.8. I've also checked a Debian Unstable system with the ovpn-dco kernel driver installed and enabled and did not encounter any issues, therefore I checked the difference between our windows and linux client configs.
Which led me to the ip-win32 (push "ip-win32 dynamic 0 86400"
) Option, which we push from our server to our clients and subsequently ignore in our Linux OpenVPN Client configs. When I ignore this option on a Windows 10 system running 2.6.0 using dco, I don't encounter any issues around IPv4 addresses nor routes.
In our use case, it is supposed to set the lease time on windows machines to a day, though I'm not entirely sure if this option is even still needed or some setting we accumulated and never removed (have to check for that one internally). After reading the documentation, it seems to revolve around the TAP-Win32 Interface. Is the issue in regards to ovpn-dco's lack of support for TAP Mode and therefore a problem in our config or an actual issue in ovpn-dco?
Hi,
On Mon, Jan 30, 2023 at 03:44:40AM -0800, Philipp Fromme wrote:
Which led me to the ip-win32 (
push "ip-win32 dynamic 0 86400"
) Option
Just get rid of that. Most of the ip-win32 options are there "because some old version of Windows XP misbehaved with some Version of OpenVPN nobody wants to remember".
DCO (and wintun) do not use DHCP, and even for TAP, this is not something which makes sense - DHCP is handled between TAP driver and Windows, and OpenVPN controls what is needed (= lease times are independent of OpenVPN connection times, and when OpenVPN quits, TAP driver is notified and DHCP address goes away).
OTOH, with DCO we should just plain ignore these values (offset/lease-time), so it's still a bug in OpenVPN...
gert
-- "If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany @.***
Thanks for the explanation. Removing the old ip-win32 push option solves our problem.
Do you want to keep this issue open as you consider the current behavior a bug in OpenVPN?
Hi,
On Tue, Jan 31, 2023 at 10:53:59PM -0800, Philipp Fromme wrote:
Thanks for the explanation. Removing the old ip-win32 push option solves our problem.
Good :-)
Do you want to keep this issue open as you consider the current behavior a bug in OpenVPN?
Yes, please keep it open. The whole "virtual DHCP" machinery is not used with DCO, so any configuration related to it must not affect DCO operations.
Did not have time to look into what really happens yet.
gert
-- "If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany @.***
Pushing ip-win32 is root of all evil.
Similar to the --pull-filter ignore route-method
we added in the GUI, shall we also add a --pull-filter ignore ip-win32
?
Though the incompatibility check in options.c between ip-win32 variants and the driver in use could be improved to also catch pushed options, its would be so much cleaner if we can just purge this option completely from push reply.
Describe the bug When using OpenVPN 2.6.0, our Windows clients can't assign the IPv4 address given by the server, which results in a later failure when the client tries to set routes dependent on that IPv4 address. The issue does not appear when using the old tap-windows6 driver by setting
disable-dco
in the client config.Redacted Log (I hope it is still readable enough):
Tested on Windows 10 2004, which should correspond to 20H1. I have also tested the same config on 21H2 with the same results.
Is this an issue in our config or a problem in the new dco driver?
Expected behavior A working IPv4 address and correctly configured routes
Version information (please complete the following information):