第 8 课,共 8 课 · 8 分钟
Natural-language firewall rules, with a human in the loop
Typing “block Teams after 6pm” is easier than filling in a rule form, but a security tool that acts on language must never guess silently. Learn how natural-language rule generation should be built, what can go wrong, and how Ask FireAI keeps you in control.
此页面暂时只有英文版。
Firewall rules have always been written in a language made for machines: protocols, address ranges, ports, directions, priorities. That is precise, and it is also why most people never write one. Natural-language rule generation flips the interface: you say what you want, in your own words, and the software translates it into a rule. Done well, it lowers the barrier to good security. Done badly, it turns a vague sentence into a silent, wrong change to your defences.
Two ways to turn words into rules
- A deterministic parser: recognises a known set of verbs (block, allow, switch), objects (an app, a company, a domain) and conditions (hours). It is predictable and easy to test, but it only understands what it was built to understand.
- A language model: understands far more phrasing and can resolve names it has never seen in a list. It is also probabilistic, can be confidently wrong, and can be steered by text it reads.
The safest designs combine them: a strict parser for the actions, and a model only where flexibility really helps, such as recognising an unfamiliar name. The action itself should always come from a small, known list.
What can go wrong
The OWASP Top 10 for LLM Applications names two risks that apply directly. Excessive Agency (LLM06) is what happens when a model is allowed to take actions with more permission or autonomy than needed, so one misunderstanding becomes a real change. Prompt Injection (LLM01) is text crafted to change a model’s behaviour; a firewall assistant should never read an app’s own description or a web page and treat it as an instruction. The NIST AI Risk Management Framework adds the general principle: keep humans able to oversee, understand and override AI-driven actions.
- Ambiguity: does “block Google” mean the browser, the company’s servers, or both?
- Over-reach: a sentence that quietly turns off protection or allows far more than intended.
- Silent failure: the system guesses rather than saying it did not understand.
- No trail: a rule nobody can trace back to the sentence that created it.
A safe pattern: preview, confirm, record, undo
The answer is a short checklist. Show the user what was understood before anything changes. Require an explicit confirmation. Keep the original sentence next to the rules it created. Make removal easy. And when the input is not understood, say so instead of guessing.
How Ask FireAI does it
Ask FireAI is a text box at the top of FireAI’s Home page. You type an order such as “block Teams” or “go in coffee shop mode”. It understands orders directly in fourteen languages, including English, French, German, Spanish, Chinese and Arabic. The list of things it can do is deliberately short:
- Add a Block or Allow rule for an app, a company or a domain, optionally only at certain hours.
- Switch the security mode (Home, Coffee shop, Paranoid, Under attack) or the operating mode (Alert, Autopilot, Silent – allow, Silent – deny).
- Turn the kill switch, or Protection itself, on or off.
- Start or stop an activity profile.
Before anything changes, FireAI shows a preview: a one-line summary and the details of what it understood. Nothing is written until you click Apply; Cancel walks away. Every applied order that adds a rule is kept in your own words under Settings › Your preferences, and deleting a preference also deletes the rules it created. If nothing was understood, FireAI says so and suggests a simple example rather than guessing.
Where does the AI come in? The orders are understood directly, without a model. Only when FireAI recognises the verb but not a name, for example a company written in a script it does not resolve, and the optional on-device AI is turned on, does the model get one more chance to name it. That model runs on the Mac. Without it, simple orders still work; FireAI just cannot guess unfamiliar names. The model helps with words; it does not decide what action is taken, and you still confirm the result.
The broader lesson for AI in security tools: let the model make the interface easier, keep the set of actions small and known, and leave the final click to a person.
Before trusting any assistant with your settings, try three sentences on it: a clear order, an ambiguous one, and one it should not understand. A good design shows you exactly what it understood, asks when it is unsure, and admits when it is lost.
要点
- Natural language lowers the barrier to writing rules, but must never change defences silently.
- Combine a strict parser for actions with a model only where flexibility helps.
- Guard against excessive agency and prompt injection (OWASP LLM06, LLM01).
- Preview, explicit confirmation, a record of the original words and easy undo are the safe pattern.
- Ask FireAI previews every order, writes nothing until Apply, and keeps each order in Your preferences.
自我检测
1. What is “excessive agency” in an LLM-based tool?
- A model that answers too slowly
- A model given more permission or autonomy to act than needed — 正确。
- A model that refuses every request
- A model that runs offline
OWASP LLM06: too much power to act turns a misunderstanding into a real change.
2. What happens in Ask FireAI before a rule is created?
- The rule is applied immediately
- A preview shows what was understood, and nothing changes until you click Apply — 正确。
- The sentence is sent to a cloud service
- An email asks for confirmation
Preview and explicit confirmation keep a human in the loop.
3. When does Ask FireAI use the on-device AI?
- For every order
- Never
- When it recognises the verb but not a name, and the on-device AI is turned on — 正确。
- Only to switch security modes
Orders are understood directly; the model only helps resolve unfamiliar names.
用 FireAI 动手做
在你自己的 Mac 上练习这节课的内容。
- FireAI 如何监视你 Mac 上的连接 — 清楚知道哪个应用在联网,用大白话说明白,而无需安装任何以隐藏后台服务方式运行的东西。
- 规则:应用、网站、域名、IP 或地址段,永久生效或直到重启 — 写一条规则,精确到单个地址,或宽泛到整个域名,任你选择。
- 自动驾驶:FireAI 替你决定简单的连接请求 — 让 FireAI 自主处理简单的决定,你随时能看到原因。
- 深度检测,无需解密任何内容 — 获得关于安全连接的真实细节,而 FireAI 从不会读取其中的内容。
- 安全模式:居家、咖啡店、偏执、遭受攻击 — 轻触一下,就能让 FireAI 的严格程度匹配 Mac 实际所在的场景。
- Coffee Shop Armor: safer on public Wi-Fi, and warned about fake networks — Sit down in any café, hotel or airport and let FireAI tighten up for you.
- 世界地图 — 直接看到你的数据实际去了哪里,而不是一个还得自己去查的主机名。
- 问 FireAI:用大白话下指令,而不是填表单 — 输入一句话就能改变 FireAI 的行为,不用在菜单里翻找。
- 调查一条连接 — 凭摆在眼前的事实做决定,而不是一句含糊的警告。
来源
- OWASP Top 10 for LLM Applications: LLM06 Excessive Agency
- OWASP Top 10 for LLM Applications: LLM01 Prompt Injection
- NIST AI Risk Management Framework
- FireAI docs: Ask FireAI
- FireAI docs: Your preferences in your own words
- FireAI docs: On-device AI model
在你的 Mac 上实践
免费试用全部功能 17 天,无需绑定银行卡。