iOS VPN Issue - Internet Unavailability Post VPN Disconnection with Full Tunnel configuration

Experiencing an internet connectivity issue on iPhone device with one of iOS VPN configuration in PacketTunnelProvider. We have set up a full tunnel route configuration as follows: _pcktTunProvider.protocolConfiguration.includeAllNetworks = YES; _pcktTunProvider.protocolConfiguration.excludeLocalNetworks = NO; _pcktTunProvider.protocolConfiguration.enforceRoutes = NO;

With these settings, the VPN successfully establishes a connection, and all traffic is routed through the tunnel as expected.

Issue we are facing: However, we encounter a problem when we attempt to disconnect the VPN. When we call the following method from PacketTunnel network extension:

  • (void)cancelTunnelWithError:(nullable NSError *)error

The VPN disconnects, but the device loses all internet connectivity and is unable to access any resources.

What we have tried: We have also tried using the following method with the same result:       - (void)stopTunnelWithReason:(NEProviderStopReason)reason completionHandler:(void (^)(void))completionHandler

Interestingly, when we call the following method from the app side. The VPN disconnects and the device retains its internet connectivity. [enabledConfig.connection stopVPNTunnel];

But for our use case we cant call stopVPNtunnel from App if App is not running so looking for a solution that could clear the tunnel from NE as cancelTunnelWithError Api causes internet blocker issue. One more similar ticket here: https://forums.developer.apple.com/forums/thread/730689

As I mentioned on the thread you referenced, this seems like a bug to me. Sadly, the folks on that thread didn’t post any bug numbers, so I can’t check on their status (or, indeed, know for sure whether a bug was even filed).

I recommend that you file a bug and post the bug number to that other thread.

Share and Enjoy

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

I have created a bug for this: https://feedbackassistant.apple.com/feedback/13812251

Even I created a DTS ticket but its returned and asked to create a bug for this.

iOS VPN Issue - Internet Unavailability Post VPN Disconnection with Full Tunnel configuration
 
 
Q