How to enforce manual DNS settings on couple adapters in Windows 10?
Hello,
I have Ethernet, Wireless & TAP adapters. I want to enforce particular DNS addresses for Ethernet & Wireless adapters on absolutely all networks these adapters connect to, while keeping TAP adapter on DHCP. How do I achieve that?
The device is often used on untrusted networks. So far the adapters revert to automatic DNS settings all the time - especially when connecting to a new network, which is very much undesired behaviour. While most sensitive traffic goes through VPN tunnel and is not affected by said behaviour, some traffic is required to go through interfaces directly (achieved by ForceBindIP). When VPN tunnel is active, direct-to-intefaces traffic inherits DNS settings of tunnel, which is acceptable behaviour; but when VPN tunnel is inactive, e.g. VPN connection is not established yet after connecting to a new network, or turned off for whatever reason, the DNS settings are retrieved by DHCP, which is undesired behaviour. Desired behaviour is wireless & wired adapters using statically configured DNS servers when VPN connection is inactive, ignoring DHCP completely, on all networks including those the device connects first time to; the TAP adapter should, however, be allowed to retrieve DNS settings via DHCP. Please help!
Posted May 20, 2019, 11:37 AM UTC · edited
control panel->network and sharing center->change adapter settings->right click on adapter->properties->highlight Internet Protocol ipv4->click properties->use the following DNS servers.
You described how I normally adjust DNS settings. They do not stick, and change to automatic after couple reconnects, all by themselves. That is the problem I'm trying to solve.