We use OpenVPN to connect to some resources in AWS private subnets.
It works as expected on macOS, iOS, and even on old Windows 7, but not on Windows 10.
In case of Windows 10 when you’re connected to VPN (doesn’t matter OpenVPN, L2TP or even PPTP) you will still get responses from DNS server which is set on your Ethernet (or WiFi) adapter.
block-outside-dns option for OpenVPN didn’t fix this problem and I decided to provide solution for all VPN types, so here it is:
You only have to fulfill variables mainIfName and vpnIfDescription with values relevant to your Windows installation:
I hope this info will be useful for you, and if you need any help feel free to use contact form on the main page.