On my Windows Server 2022 Standard, I have two network adapters.
- The physical network card, which has IP 10.0.22.10/24
- The OpenVPN virtual WinTun adapter, which has IP 10.0.30.1/24
Note that I am using the netmask 255.255.255.0, not 255.0.0.0.
Beside OpenVPN, the server has the roles DHCP, DNS, and ActiveDirectory.
As soon as someone connects to OpenVPN, then the WinTun adapter will get IP 10.0.30.1. This IP address is added to the DNS Server, so that my hostname resolves to 10.0.22.10 and 10.0.30.1
The problem: The clients in the company network sometimes resolve the servername to 10.0.30.1, and therefore they cannot reach the server, since 10.0.30.1 is bound to the virtual network adapter and not the physical network adapter.
How can I avoid that the IP address of the virtual WinTun adapter gets automatically added to the DNS Server as "Static IP"?