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

# excludeLocalNetworks

## Declaration

```swift
var excludeLocalNetworks: NEPacketTunnelNetworkSettings.IPFamily { get set }
```

## Discussion

Discussion If this property is set, traffic destined for local networks will be excluded from the tunnel. The set value of NEPacketTunnelNetworkSettingsIPFamily type indicates if excludeLocalNetworks should be applied to all traffic, IPv4 only or IPv6 only. The default is NEPacketTunnelNetworkSettingsIPFamilyNone on macOS and NEPacketTunnelNetworkSettingsIPFamilyAny on iOS. If either the includeAllNetworks or the enforceRoutes property in NEVPNProtocol class is set, then the excludeLocalNetworks property in NEVPNProtocol class takes precedence.
