---
title: excludeLocalNetworks
framework: networkextension
role: symbol
role_heading: Instance Property
path: networkextension/nevpnprotocol/excludelocalnetworks
---

# excludeLocalNetworks

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

## Declaration

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

## Mentioned in

Routing your VPN network traffic

## Discussion

Discussion If this property is true, the system excludes network connections to hosts on the local network — such as AirPlay, AirDrop, and CarPlay — but only when the includeAllNetworks or enforceRoutes property is also true. NETransparentProxyManager doesn’t support this property. The default value for this property is false in macOS and true in iOS.

## See Also

### Routing network traffic

- [includeAllNetworks](networkextension/nevpnprotocol/includeallnetworks.md)
- [excludeAPNs](networkextension/nevpnprotocol/excludeapns.md)
- [excludeCellularServices](networkextension/nevpnprotocol/excludecellularservices.md)
- [enforceRoutes](networkextension/nevpnprotocol/enforceroutes.md)
