<!--
{
  "availability" : [
    "iOS: 14.2.0 -",
    "iPadOS: 14.2.0 -",
    "macCatalyst: 14.2.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEVPNProtocol/excludeLocalNetworks",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEVPNProtocol(py)excludeLocalNetworks"
  },
  "title" : "excludeLocalNetworks"
}
-->

# excludeLocalNetworks

A Boolean value that indicates whether the system excludes all traffic destined for local networks from the tunnel.

```
var excludeLocalNetworks: Bool { get set }
```

## Discussion

If this property is <doc://com.apple.documentation/documentation/Swift/true>, the system excludes network connections to hosts on the local network — such as AirPlay, AirDrop, and CarPlay — but only when the [`includeAllNetworks`](/documentation/NetworkExtension/NEVPNProtocol/includeAllNetworks) or [`enforceRoutes`](/documentation/NetworkExtension/NEVPNProtocol/enforceRoutes) property is also <doc://com.apple.documentation/documentation/Swift/true>. [`NETransparentProxyManager`](/documentation/NetworkExtension/NETransparentProxyManager) doesn’t support this property.

The default value for this property is <doc://com.apple.documentation/documentation/Swift/false> in macOS and <doc://com.apple.documentation/documentation/Swift/true> in iOS`.`

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)