How to debug/see all traffic coming to NEPacketTunnelProvider?

Hello,

I am working on a NetworkExtension that uses NEPacketTunnelProvider.

Is there any option to somehow see all traffic that gets send to my extension?

Some apps have issues working over my tunnel, so I want to check the connections and see what is happening.

Is there any option to somehow see all traffic that gets send to my extension?

Yes; usually this would include reading packets from the virtual interface, via something like readPacketsWithCompletionHandler, and parsing them as IP packets, and then sending them on their way appropriately. This should allow you to diagnose any issues with the IP packet header or payload.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Is it possible that this is not getting called? I had a couple of os_logs there and nothing in the console.

Is it possible that this is not getting called?

Absolutely. To debug this, try setting the default route as the backstop and see if you get traffic then to at develop forward with. From there, you know that you need to go back and refactor the setting in your NEPacketTunnelNetworkSettings.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
How to debug/see all traffic coming to NEPacketTunnelProvider?
 
 
Q