# Mac firewall rules: by app, website, domain, IP or range

> Build a per-app firewall rule on your Mac from an app and a destination, as precise as one address or as broad as a whole domain.

FireAI Docs (HisnLabs) · Feature · Available since FireAI 0.1.0
Canonical: https://hisnlabs.com/fireai/en/docs/per-app-rules

**Where in FireAI:** Rules

Write a rule as precise as one address or as broad as an entire domain.

“Rules decide which apps may go online and where. FireAI checks them for every connection.” Switch between a Simple and an Expert view, search by app, website or group, and filter to a group or to rules unused for 30 days or more.

## Building a rule

1. Click Add rule.
2. Allow or block? — “Let it connect” or “Stop the connection”.
3. Which app? — Any app, or pick one from what FireAI has seen.
4. Which website or server? — Anywhere on the internet, One website, A website and all its subdomains, One IP address, or A range of IP addresses, then type it in.
5. How long? — Always, or Until I restart my Mac.

> **Note:** “Until the app quits” and “Just this once” aren’t offered when adding a rule here — those two only come from answering a connection prompt.

## Advanced

- Direction (outgoing, incoming, or both), Protocol (any, TCP, UDP), and a Port or port range.
- Profile, to scope a rule to one place instead of everywhere (see [Rule profiles by Wi-Fi network](https://hisnlabs.com/fireai/en/docs/rule-profiles-by-wifi)).
- Group, a name you choose, so related rules can be enabled or disabled together.
- Quick: check before every other rule — the first matching quick rule decides before anything else, useful when you need one rule to always win.
- A note, and a switch to turn the rule off without deleting it.

Each rule shows how many times it has matched and when it was last used, so you can spot rules that no longer do anything.

## Read next

- [Block an app’s internet access on Mac, or just one company or domain](https://hisnlabs.com/fireai/en/docs/block-an-app-or-a-company.md)
- [Quick rules: check before every other rule](https://hisnlabs.com/fireai/en/docs/quick-rules.md)
- [Timed rules: only at night, only during work hours, only on weekends](https://hisnlabs.com/fireai/en/docs/timed-rules.md)
- [Import and export your rules](https://hisnlabs.com/fireai/en/docs/import-export-rules.md)

---

Try every feature free for 17 days, no card needed. 30-day money-back guarantee. [Download for Mac](https://hisnlabs.com/fireai/en/download)
