---
title: NEFilterRule
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/nefilterrule
---

# NEFilterRule

A rule for filters that combines a rule to match network traffic and an action to take when the rule matches.

## Declaration

```swift
class NEFilterRule
```

## Topics

### Creating a Filter Rule

- [init(networkRule:action:)](networkextension/nefilterrule/init(networkrule:action:).md)

### Inspecting Filter Rule Properties

- [networkRule](networkextension/nefilterrule/networkrule.md)
- [action](networkextension/nefilterrule/action.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.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

### Creating Filter Settings

- [init(rules:defaultAction:)](networkextension/nefiltersettings/init(rules:defaultaction:).md)
