Development discussion of WireGuard
 help / color / mirror / Atom feed
* WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found
@ 2020-08-08 11:44 Ferad Zyulkyarov
  2020-08-14 10:00 ` Simon Rozman
  2020-08-18  7:43 ` Jason A. Donenfeld
  0 siblings, 2 replies; 4+ messages in thread
From: Ferad Zyulkyarov @ 2020-08-08 11:44 UTC (permalink / raw)
  To: wireguard

Hi,

I have installed WireGuard on Windows server 2017. When I manually
activate the tunnel through the client application (manager) all works
fine. After I restart the computer, WireGuard fails to start
automatically. The log contains the following error:

[tun] [wg0] Unable to create Wintun interface: Error registering
rings: Error listing NDIS interfaces: no interfaces found

I can explicitly/manually activate the tunnel through the client
application but I need the tunnel to start automatically if the
machine restarts.

I have it installed in other Windows Server 2017 machines and on those
machines WireGuard starts automatically when the system boots.

I would appreciate your help in addressing the problem of WireGuard
auto start when the machine boots.

Thanks in advance

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found
  2020-08-08 11:44 WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found Ferad Zyulkyarov
@ 2020-08-14 10:00 ` Simon Rozman
  2020-08-18  7:43 ` Jason A. Donenfeld
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Rozman @ 2020-08-14 10:00 UTC (permalink / raw)
  To: Ferad Zyulkyarov, wireguard

Hi,

> I have installed WireGuard on Windows server 2017. When I manually
> activate the tunnel through the client application (manager) all works
> fine. After I restart the computer, WireGuard fails to start
> automatically. The log contains the following error:
> 
> [tun] [wg0] Unable to create Wintun interface: Error registering
> rings: Error listing NDIS interfaces: no interfaces found
> 
> I can explicitly/manually activate the tunnel through the client
> application but I need the tunnel to start automatically if the machine
> restarts.
> 
> I have it installed in other Windows Server 2017 machines and on those
> machines WireGuard starts automatically when the system boots.
> 
> I would appreciate your help in addressing the problem of WireGuard auto
> start when the machine boots.

Looks like the WireGuard tunnel service is started too early on this particular computer - even before Windows networking (NDIS).

We need to investigate, which additional service or resource we need to make the Wireguard tunnel services depend on.

I would suggest you to change the WireGuard Manager and Tunnel services startup to Automatic (Delayed), but I am afraid the WireGuard Manager service deletes the tunnel services on each shutdown and recreates them on startup.

Furthermore, delayed-started services come up way after the Group Policy Client service. If you use WireGuard to remotely connect this computer to your Active Directory, the boot-time Group Policies won't apply.

So, anyway you slice it... we need to fix this in WireGuard service dependencies (or add a retry loop on boot as a last resort). Stay tuned.

Regards,
Simon


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found
  2020-08-08 11:44 WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found Ferad Zyulkyarov
  2020-08-14 10:00 ` Simon Rozman
@ 2020-08-18  7:43 ` Jason A. Donenfeld
  2020-08-18  8:50   ` Ferad Zyulkyarov
  1 sibling, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2020-08-18  7:43 UTC (permalink / raw)
  To: Ferad Zyulkyarov; +Cc: WireGuard mailing list, Simon Rozman

Hopefully this addresses your issue:
https://git.zx2c4.com/wireguard-windows/commit/?id=86cf5c84384bde2b4147fc5eedee24937729a101

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found
  2020-08-18  7:43 ` Jason A. Donenfeld
@ 2020-08-18  8:50   ` Ferad Zyulkyarov
  0 siblings, 0 replies; 4+ messages in thread
From: Ferad Zyulkyarov @ 2020-08-18  8:50 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list, Simon Rozman

Jason and Simon, thanks for the reply.

I tried Jason's recommendation and added Tcpip as a dependence to the
WireGuard service. This doesn't seem to solve the problem.

I added the dependency by executing the following command:
sc config WireGuardTunnel$wg0 depend= nsi/Tcpip

After executing this command I verified that noth NSI and TCPIP are
listed as dependencies.

I restarted the machine few times but still WireGuard does not start
automatically when the machine starts.There is the same error in the
WireGuard log file: [tun] [wg0] Unable to create Wintun interface:
Error registering
rings: Error listing NDIS interfaces: no interfaces found

I need to start WireGuard manually.

I tried the recommendation from Simon to set startup type to
"Automatic (delayed start)" for the WireGuard service. Unfortunately,
this also does not solve the problem. WireGuard does not start. I
check the logs and I see

[MGR] Removing Wintun interface ‘wg0’ because its service is stopped

It looks like the WireGuard manager removes the service and installs
again. As a result the dependency to TCPIP disappears.

In my first email I explained, but worth mentioning again. There are
other Windows machines same OS, where WireGuard starts automatically
at startup. This is very strange that in some machines it starts and
in others it does not. If you guide me I can try to help debug this
issue and address.

Regards,
Ferad


On Tue, Aug 18, 2020 at 9:43 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Hopefully this addresses your issue:
> https://git.zx2c4.com/wireguard-windows/commit/?id=86cf5c84384bde2b4147fc5eedee24937729a101

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-18 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-08 11:44 WireGuard on Windows: Unable to create Wintun interface: Error registering rings: Error listing NDIS interfaces: no interfaces found Ferad Zyulkyarov
2020-08-14 10:00 ` Simon Rozman
2020-08-18  7:43 ` Jason A. Donenfeld
2020-08-18  8:50   ` Ferad Zyulkyarov

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/wireguard

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 wireguard wireguard/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git