I have created a NEPacketTunnelProvider which seems to work currently in testing.
However I have noticed that the DNS do not go through the TUN interface, even setting a bogus DNS server in NEPacketTunnelNetworkSettings still has no effect and I'm able to browse just fine.
I also know that there is the DNS Proxy Provider, can it be used in conjuction with Packet Tunnel Provider?
Though from what I have read this is not available for the general public and can only be used on supervised / managed devices?
Are there any supported methods of running a local DNS server, say on 127.0.0.1 and redirect all DNS queries to this server?
Though from what I have read this is not available for the general public and can only be used on supervised / managed devices?
See TN3134 Network Extension provider deployment.
Also see TN3120 Expected use cases for Network Extension packet tunnel providers. I see a lot of folks trying to use a packet tunnel provider to implement a content filter. IME there’s no way to implement that reliably, and it’s not something that DTS supports.
If you are actually implement a VPN, you have a few options when it comes to DNS. For the details, see this post.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"