Search results for

includeAllNetworks

150 results found

Post

Replies

Boosts

Views

Activity

Reply to enforceRoutes causes excludedRoutes to be ignored
Ok, I'll open a report. When I say I checked every combination I do mean every combination, even ones that didn't make sense. I would have expected the behavior you described. This is the log from enforceRoutes YES, includeAllNetworks NO, excludedRoutes set (pruned a bit because it was pretty verbose): # Protocol properties seen by the extension: # [Jun 1, 2023 at 3:57:58 PM PDT] : Protocol Properties: . . . includeAllNetworks = NO excludeLocalNetworks = NO excludeCellularServices = YES excludeAPNs = YES enforceRoutes = YES . . . # Network settings we're passing to setTunnelNetworkSettings:completionHandler: # [Jun 1, 2023 at 3:57:59 PM PDT] : setting NEPacketTunnelNetworkSettings: { tunnelRemoteAddress = 10.200.1.200 DNSSettings = { protocol = cleartext server = ( 172.16.1.1, ) matchDomainsNoSearch = NO } proxySettings = { autoProxyDiscovery = NO autoProxyConfigurationEnabled = NO HTTPEnabled = NO HTTPSEnabled = NO FTPEnabled = NO SOCKSEnabled = NO RTSPEnabled = NO gopherEnabled = NO exclud
Jun ’23
Reply to enforceRoutes causes excludedRoutes to be ignored
If we define either includeAllNetworks or enforceRoutes, then the excludedRoutes are ignored, and all traffic gets tunneled. This is the part that needs to further investigation. I would expect that if you set includeAllNetworks to NO, enforceRoutes to YES, and then you have set of excludedRoutes that they be excluded from the tunnel and would go through the primary interface. I would open a bug report on this and add this to your thread.
Jun ’23
Reply to enforceRoutes causes excludedRoutes to be ignored
The definition of excludedRoutes: excludedRoutes The IPv4 network traffic that the system routes to the primary physical interface, not the TUN interface. Makes it clear that they should not be sent to the TUN interface. This is not what's happening. If we define neither includeAllNetworks nor enforceRoutes, then the excludedRoutes are properly excluded. If we define either includeAllNetworks or enforceRoutes, then the excludedRoutes are ignored, and all traffic gets tunneled. We tested every combination of the enforceRoutes, includeAllNetworks, excludeLocalNetworks, and overridePrimary options. We can provide logs showing the network settings provided to the Network Extension framework at start time, along with the protocol settings, as well as the traffic from the excluded network going to the VPN extension.
Jun ’23
Network Extension freezes in a .disconnecting state when there is no internet connection
Hi, everyone! Our application has the ability to run the Network Extension when there is no internet connection. While testing our application, we found incorrect behavior in the Network Extension disconnect process when there is no internet connection, sometimes the Network Extension hangs in a .disconnecting state when it finishes. In most cases, the work in this case finishes correctly. So for example. We monitor changes in the Network Extension connection status using NEVPNStatusDidChange notifications. We turn off the Internet and try to connect to the VPN tunnel using next NETunnelProviderManager configuration: { localizedDescription = enabled = YES protocolConfiguration = { serverAddress = <13-char-str> disconnectOnSleep = NO includeAllNetworks = NO excludeLocalNetworks = YES enforceRoutes = NO providerBundleIdentifier = } onDemandEnabled = NO } Next, we get the configuration and try to start the Network Extension via NEVPNConnection.startVPNTunnel(options:). When call finished, we get
1
0
578
Apr ’23
VPN not working after macos13 update with includeAllNetworks=true
Hi, I have a problem with the VPN profile on macos 13 with some custom VPN protocol. I've run the VPN application when I had macos 12.x. The application worked fine, created system configuration. Then I've updated the os to 13. After the update I'm not able to connect to VPN when includeAllNetworks=true. The defaultPath is always unsatisfied, so the tunnel is not able to connect to VPN server. The system routes seam to be ok using netstat and route. If VPN is started with includeAllNetworks=false it works. On logs I've saw that when includeAllNetworks=true, nesessionmanager prints the following errors: error 08:01:59.652919+0100 nesessionmanager -[NESMVPNSession setDefaultDropAll]: VPN addLocalNetworksExceptionWithOrder failed for Control priority error 08:01:59.653105+0100 nesessionmanager VPN-includeAllNetworks evaluateConfiguration failed error 08:01:59.653479+0100 nesessionmanager -[NESMVPNSession setDefaultDropAll]: VPN addLocalNetworksExceptionWithOrder failed for Hig
1
0
1.4k
Apr ’23
Sockets created in NE app are bound to utun interface on Ventura 13
First sorry for the long message, but I wanted to give as much info as possible. I have a VPN app that uses Network Extension and OpenVPN on Ventura (13.1). Before Ventura everything worked fine. I have a problem with sockets created from network extension. The sockets created into the extension are assigned on the tunnel interface (utun3 in my case). Scenario: Start the VPN (includeAllNetworks=true) => OS creates utun3 and enters into startTunnel from NE app On extension the app connects to VPN server. Call setTunnelNetworkSettings with the new configuration and when finished calls the completionBlock from startTunnel and reasseting = false After 2 seconds create a new socket (C API) into NE and connect => socket is bound to tunnel interface. # lsof output wifi ip=192.168.0.163 utun3 IP=10.7.1.4 8u IPv4 0xb394555904672715 0t0 TCP 192.168.0.163:60266->VPN_SERVER_IP (ESTABLISHED) 9u IPv4 0xb394555904673d35 0t0 TCP 10.7.1.4:60284->SOME_WEBSITE_IP:http (ESTABLISHED) From this point on, all t
9
0
2k
Apr ’23
VPN, includeAllNetworks, and MMS
I work on an iOS VPN app, and we're having some problems with the interaction between MMS and the includeAllNetworks flag. When the includeAllNetworks flag is on, MMS sending fails. I believe this is because iOS is trying to go outside the VPN tunnel and over cellular and is using the cellular network's default DNS lookup for the MMS server (in a sample case we've been using for testing, mms.msg.eng.t-mobile.com). (Logs seem to show the phone dropping back to cellular even when it has a strong WiFi connection.) I believe iOS also chooses the cellular connection when making the request where the MMS packets are sent. And thus with includeAllNetworks active, iOS does not permit these packets through, causing the MMS send to fail. Does this explanation above seem accurate, and seem like why MMS isn't working with the VPN active? We've been debugging via Console logs, and can see the DNS request fail, but have limited insight into the lower level parts of the networking stack. Does includeAllNetworks
4
0
1.6k
Apr ’23
Reply to Network is down error received in SystemExtension while Internet is working in other Apps like Safari
Hi, Did you've managed to find a solution for this problem? I don't know if it helps, but we had the same issue when includeAllNetworks is used. We've saw that adding a delay at setTunnelNetworkSettings fixes the problem with sockets. We are using the C API, socket(). As far as I saw this is not working with NWConnection, but it works with createTCPConnection too. And for us was reproduced only starting with macos 13.X. The idea is something like: setTunnelNetworkSettings(networkSettings) { error in DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { <--- without this 0.5 delay is not working completeBlockFromStartTunelImpl(error) } } This is the link with our bug: https://developer.apple.com/forums/thread/723314 Another issue that we still have is that after reboot we cannot connect, even with the above delay. So the other fix is to delete the VPN profile from system. And in this case, until reboot everything works fine, until it breaks again :). Hope it helps.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’23
Reply to Is there a way to exclude traffic generated by VPN Controller App from packet-tunnel provider running in ip-destination mode?
I suspect you want to gather some information to provide to your VPN in aide in tunnel connection, and that is why you want to make a network call before the tunnel is connected. You understood it correctly. Let me explain it again in more detail. As part of establishing VPN connection, Just after successful SSL Handshake with Tunnel Server, Tunnel Server provides one URL, Packet Tunnel extension passes this URL to VPN Controller App, and using this URL Controller App fetches some settings(user auth required). Since Network connectivity is blocked until the VPN is connected, we are unable to make a call to URL provided by Tunnel Server, and we have to make this call to fetch some settings which is required in order to establish VPN connection(before we return completionHandler(nil)). are you able fetch those resources inside the provider? As I mentioned above, unfortunately No. ` Since Network connectivity is blocked until the VPN is connected, unable to fetch required resources inside the provider. so presum
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’23
Reply to VPN, includeAllNetworks, and MMS
While I can dream of a flag to allow MMS through I recommend that you do more than just dream. do you know of a way to allow MMS to go outside the VPN while otherwise keeping similar functionality to includeAllNetworks No. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Jan ’23
Reply to VPN, includeAllNetworks, and MMS
I understand the philosophy behind that, but the user (and developer) experience seems subpar: macOS and iPadOS (on a WiFi iPad): If you set includeAllNetworks you can ensure all the user's traffic goes through the VPN tunnel, with no loss of functionality. iOS: If you set includeAllNetworks, you can ensure all the user's traffic goes through the VPN tunnel, but MMS will not work. Your choice is either let MMS work, but don't guarantee the remaining traffic goes through the tunnel or kill user's MMS functionality. MMS is currently treated differently by iOS when there is a WiFi connection, as seen in the logs - it diverts MMS traffic to the cellular network. Given how cell companies require MMS to be delivered, it doesn't seem out-of-line that it would also be treated differently by iOS if a VPN is active. And even if this wasn't the default, adding a flag to allow MMS to go outside a VPN seems really, really helpful here. (We already have an optional excludeLocalNetworks flag that only matt
Jan ’23
Reply to VPN, includeAllNetworks, and MMS
The fact that MMS fails when you set includeAllNetworks doesn’t surprise me. You’ve specifically told the system that you want all network traffic, which is at odds with standard cellco practice of requiring that MMS be delivered over the cellco’s network. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Jan ’23
Binding socket to an interface in Network Extension
When trying to bind a socket to the tunnel interface via setsockopt(socket, IPPROTO_IP, IP_BOUND_IF, &ifindex, len) Within the PacketTunnel itself despite this call succeeding the data is still routed through the default interface. This is observed when includeAllNetworks is true. When it is false it seems to send it on both interfaces. Is there something wrong with how I'm doing it?
4
0
1.2k
Sep ’22