I am building a PacketTunnel using SystemExtensions. I have a local FQDN that does not quite resolve using DNS server. Therefore, I have an entry in /etc/hosts
which points to the IP of the server. I am able to access this server via FQDN in Safari as well as able to ping it in Terminal.
However, my SystemExtension
completely ignores the entry in /etc/hosts
file and tries to resolve it using default DNS server which results in NXDOMAIN
. I can see its DNS query in Wireshark. So, why would the SystemExtension
not follow other apps and use the entries from hosts file for FQDN resolution?
I have already tried to flush dnscache, adding a synthesised IPv6 address and many other suggestion on internet but SystemExtension
just refuses to resolve using hosts file. Is there any reason for this behaviour or I could be doing something wrong?