---
title: NEOnDemandRuleDisconnect
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/neondemandruledisconnect
---

# NEOnDemandRuleDisconnect

A VPN On Demand rule that disconnects the VPN.

## Declaration

```swift
class NEOnDemandRuleDisconnect
```

## Overview

Overview When rules of this class match, the VPN connection is not started, and the VPN connection is disconnected if it is not already disconnected.

## Relationships

### Inherits From

- [NEOnDemandRule](networkextension/neondemandrule.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Settings

- [NEOnDemandRuleConnect](networkextension/neondemandruleconnect.md)
- [NEOnDemandRuleIgnore](networkextension/neondemandruleignore.md)
- [NEOnDemandRuleEvaluateConnection](networkextension/neondemandruleevaluateconnection.md)
- [NEOnDemandRule](networkextension/neondemandrule.md)
