PacketTunnelProvider NEDNSSettings not working on BigSur

Hi,

We have a remote access VPN client implemented as SystemExtension using PacketTunnelProvider APIs.
For DNS settings we are making use of NEDNSSettings APIs as follows:
Code Block    
  settings.IPv4Settings = tun_ipv4_settings;
  settings.MTU = tun_mtu;
  settings.DNSSettings = tun_dns_config;
  [tun_device setTunnelNetworkSettings:settings completionHandler:^(NSError *error){
    if(error == NULL){
      // Further processing
    }else{
      // Further processing
    }
  }];

Here are the issues we are experiencing with different MacOS versions:

Catalina (10.15.6)

Ping works, Chrome, Firefox can resolve DNS successfully. Issue seen with Safari.

Things are working fine on Catalina (10.15.6) except for Safari, where Safari does not seem to resolve dns.

Command line utilities like nslookup and dig don't work but I guess its fine as these tools refer to /etc/resolv.conf file for DNS resolution and MacOS handles it differently.

Ping works fine with FQDN, Chrome, Firefox are able to resolve DNS successfully!
For these we can see DNS queries/response packets on utun interface.
I am not sure if there is a known issue with Safari for DNS on Catalina.

BigSur (11.2.3)

DNS resolution does not work at all!

DNS config can be viewed using scutil --dns and it shows the correct configuration for utun interface.

While testing our client on BigSur we see multiple issues related to DNS.
We are not able to access servers behind VPN gateway via any browser.
Ping doesnt not work.
We cannot see any DNS traffic on utun interface.

Is there any known issue with DNS on BigSur or are we missing something?

Thanks.

Answers

I am not sure if there is a known issue with Safari for DNS on Catalina.

Not that I am aware of. What do your tun_dns_config look like?


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Thanks Matt for your reply.

This is ruoghly how we are storing DNS settings:

Code Block
tun_dns_config = [[NEDNSSettings alloc]initWithServers:dns_servers];
tun_dns_config.matchDomains = match_domains;
tun_dns_config.searchDomains = search_domains;

Where dns_servers, match_domains and search_domains are NSString NSArrays.

Things are working fine on Catalina (except for Safari browser),
On BigSur DNS doesnt seem to work at all.

Thanks.