DNS on VPN does not work
I have an Azure Point-to-Site VPN over IKEv2 configured and it works well. The problem is with DNS.
- DNS adresses are filled in Advanced tab of the VPN connection but it does not resolve anything.
- The DNS server is not listed with command
scutil --dns
- The VPN connection is not present at output of command
scutil --nc list
nor withscutil --nwi
- I cannot see the VPN connection entry even on the "Set service order" option in Network settings, viz screenshot below (...how humiliating!)
What is going on? What should I do to make it work?
OS X version 10.14.4 (18E226)
ad 2) scutil --dns
DNS configuration
resolver #1
nameserver[0] : 192.168.1.1
if_index : 5 (en0)
flags : Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
resolver #2
domain : local
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300000
(and many other "local mdns")
ad 3)
scutil --nc list
Available network connection services in the current set (*=enabled):
(nothing)
scutil --nwi
Network information
IPv4 network interface information
en0 : flags : 0x5 (IPv4,DNS)
address : 192.168.1.102
reach : 0x00000002 (Reachable)
REACH : flags 0x00000002 (Reachable)
IPv6 network interface information
No IPv6 states found
REACH : flags 0x00000000 (Not Reachable)
Network interfaces: en0 ipsec0
4) Humiliating inconsistence
Looks like the Vnet Gateway needs to "push" the DNS server as well. See the following link for more details of how i got it to work with macOS 10.15.4 and Azure Point-to-site
https://stackoverflow.com/questions/51615301/approach-for-private-dns-when-using-point-to-site-with-azure-vpn-gateway/60870856#60870856