Dialup IPsec, NAT and Windows Server DNS - Split brain issue (fixed but confused)
Recently configured dialup IPsec /w IKEv2 and Azure SSO; Mode Config, IPs assigned from a specified range. Works great. No issues really.
DNS settings for the tunnel are configured for the internal DNS servers behind the VPN so clients can lookup specific resources. Split tunneling is enabled. Again. Test working!
Today I configured some new split-brain zones on our DNS servers to handle external access to an Internal/Exteral resource (PBX). To keep the tunnel traffic down, I setup a zone record to provide remote hosts (Hosts with IPs matching the IP Range in the VPN config) with the public IP of our PBX. That way when DNS lookups are done, the PBX's public IP is returned from the internal DNS server to those hosts. No need to use VOIP over the tunnel.
Firewall policy as its been working is VPNINTERFACE > LAN , VPN_Range > LAN_Range , (Services) > Allow
when connected, nslookup still resolves to the internal IP. The internal DNS server is not applying the dns policy to the VPN IP range and returning the public IP like it should.
So then I changed the firewall policy by turning off NAT.
Reconnected to VPN. nslookup resolves public IP of our PBX properly. now. DNS server receives DNS lookup from IP matching subnet in the DNS Zone policy and sends the proper response based on that policy. So my question:
TLDR; when NAT is enabled this policy, what is our DNS server thinking its getting its DNS requests from if its not getting them from the IP range in the policy?? Disabling NAT fixes the issue.