NEPackTunnelProvider no route to host

Our software is a VPN app that uses the PackTunnelProvider solution.Some customers have reported frequent failures to connect to the VPN server. Killing the app and restarting it does not work, but restarting the iOS system restores the connection.

We checked the logs and found that the TCP connection could not be established, with the error message "No route to host". This is usually a network problem.

However, the customer's other apps, including our host app, can access the network normally.

To check the network quality, the VPN process pings apple domain at the same time. We found that every time the user cannot connect to the VPN server, the VPN process ping apple has the following error: kCFErrorDomainCFNetwork-Fehler 2.

Can you tell me if there are any situations that could cause this problem?

This sounds like a bug to me. I recommend that you file it as such.

For this bug to be actionable you’ll need to attach a sysdiagnose log taking shortly after reproducing the issue. If you can’t reproduce it yourself, you should work with your customers to gather that log.

For info on how to generate sysdiagnose logs, see our Bug Reporting > Profiles and Logs page.

Ideally you’d install the Network Diagnostics and VPN (Network Extension) debugging profiles before reproducing the problem and triggering the sysdiagnose log, but I realise that this might be a bit of an ask for your customers.

Once you’re done, please post your bug number, just for the record.

Share and Enjoy

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

The user is unwilling to cooperate in obtaining the logs. We only have information that the user's iOS system is 16.0.3 and the device model is iPhone13,4. We hope this helps you.

NEPackTunnelProvider no route to host
 
 
Q