PacketTunnelProvider does not gather packets

Hello! I'm trying to develop an app using PacketTunnelProvider.

I set up local VPN server, and successfully established UDP session between client and server. Also, I was able to exchange some test packets using session.writeDatagram()

There is problem: It seems that packetFlow.readPacketObjects does not gather real packets at all.

Unless I set DNS settings for PacketTunnelProvider as
settings.dnsSettings = NEDNSSettings(servers: ["8.8.8.8", "8.8.4.4"])
Then, tunnel does catch only DNS queries.

How can I get all allowed packet traffic? Is it possible? Give me some hints, please

Thank you

Is this specifically about DNS? That is, your packet tunnel provider can run a UDP flow in general — both the outbound and inbound parts — but it just doesn’t see DNS queries.

If so, does this affect just queries from the system resolver? If, for example, you create a small test project that sends a UDP datagram out to port 53, does your packet tunnel provider see that?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Tried packet tunnel provider on another phone, it works fine there with/without dns settings

I do not know why I had this problem on initial phone. OS is up to date. I even hard reset it

PacketTunnelProvider does not gather packets
 
 
Q