Opened 5 years ago

Closed 2 years ago

#1074 closed Feature Wish (fixed)

extend iservice to turn off DHCPv4 (or handle address service)

Reported by: Gert Döring Owned by:
Priority: major Milestone: release 2.5
Component: Windows GUI Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc: Selva Nair, stipa

Description (last modified by Gert Döring)

as per the thread on openvpn-devel, if the tun/tap interface on windows is set to "manual IP address", open will fail - openvpn.exe runs non-privileged but still tries to run "netsh" to re-enable DHCP, which has to fail.

Two possible approaches to fix this:

  • teach the iservice to turn on DHCP
  • or just use the iservice to configure the IPv4 address (as we do for IPv6) if "no DHCP" is detected

Tagging this as "Windows GUI" even if it isn't (it's not tap*windows either, and we have no other "windows" category)


Change History (7)

comment:1 Changed 5 years ago by Gert Döring

Description: modified (diff)

comment:2 Changed 5 years ago by Gert Döring

Owner: Heiko Hund deleted
Status: newassigned

comment:3 Changed 5 years ago by tct


comment:4 Changed 2 years ago by Gert Döring

Cc: snair stipa added

I think all relevant functionality is there now? For wintun, we use the iservice to call ipapi already, since:

commit 1c4a47f796639da45ec7c9bf5f38a9f0bb6aa9b2
Author: Lev Stipakov <lev@…>
Date: Wed Dec 18 07:18:18 2019 +0100

wintun: set adapter properties via interactive service

Since Wintun doesn't do DHCP, use interactive service
calls to set up adapter properties.

and the DHCP part came in with

commit b4fc8bbd6b1d0211dd6982c4accedfbe4ae7e3ed
Author: Selva Nair <selva.nair@…>
Date: Tue Oct 2 16:01:13 2018 -0400

Enable dhcp on tap adapter using interactive service

Currently, if dhcp on the TAP interface is disabled, OpenVPN
on Windows tries to enable it using netsh but that succeeds only when
run with admin privileges.

When interactive service is available, delegate this task to the

@selva, @lev, can we close this?

comment:5 Changed 2 years ago by Gert Döring

Cc: Selva Nair added; snair removed

comment:6 Changed 2 years ago by Selva Nair

Yes this may be closed.

comment:7 Changed 2 years ago by Gert Döring

Resolution: fixed
Status: assignedclosed

One down, 400+ to go... :-)

Note: See TracTickets for help on using tickets.