What Is a Programmable Firewall?

Necco Ceresani
Necco Ceresani
·11 min read

Fifteen years building engineering platforms, currently focused on advanced AI infrastructure at yeet. I love turning the deeply complex topics into something everyone can understand. I relate deeply with the core yeet philosophy that you can just build things.

Last updated: November 2026

Quick answer. A firewall where the rule is a program you write rather than a configuration option the vendor shipped. Conventional firewalls expose a match expression: you pick from the fields the engine exposes and combine them. A programmable firewall exposes a small language that compiles to something the data path executes, so a rule can carry state between packets, decode a protocol, keep a token bucket, or rewrite bytes. It is not a new idea. F5 reports that iRules power 70% of BIG-IP instances and that over 85% of its customers rely on them, and Cloudflare, A10 and others all ship a scripting layer. What is new is doing it on Linux hosts you already own rather than on a vendor's box.

I build eBPF tooling at yeet. The question in the title gets asked in two very different tones: by engineers who want to know what the data path actually runs, and by buyers who want to know which category it sits in. There is no analyst category called "programmable firewall", so the honest answer starts with the engineering.

What makes a Linux firewall programmable rather than configurable?

The rule stops being a selection from a fixed vocabulary and becomes something that actually executes on the data path. That is a bigger change than it sounds, because it moves the ceiling on what a rule can express from the vendor's roadmap to your own ability to write one.

A configurable firewall gives you fields and operators. You write source, destination, port, protocol, maybe connection state, and the engine evaluates your expression against each packet. Everything the rule can express was decided when the engine was built, and anything outside it requires a release from the vendor.

A programmable firewall gives you a language instead. The rule is compiled into instructions the data path runs, which means its expressive ceiling is set by the instruction set rather than by the list of fields somebody decided to expose. The difference shows up immediately in rules that need to remember something:

nocase;
pattern login = "POST /login";

filter {
    if (dport != 8080) return pass;
    if (scan(payload, 1460) & login) {
        if (src.rate(5, 10)) {
            return ban(300);
        }
    }
    return pass;
}

That rule keeps a token bucket per source address, matches a pattern inside the payload, and bans the source rather than the connection, so reconnecting does not reset anything. None of those three is a field you could have selected from a list.

Is a programmable firewall a new idea, or do F5 iRules already do it?

No, and treating it as new is the fastest way to get the history wrong and the market read with it. The demand has been visible and paid for since the early 2000s, on appliances rather than on hosts.

F5 shipped iRules, a Tcl-based language running on the traffic path, in the early 2000s, and the company's own position is that programmability is why customers stay. Its 2025 figures, vendor-reported and not independently verified, are that iRules power 70% of BIG-IP instances and that over 85% of BIG-IP customers rely on them. A10 has aFleX, also Tcl. Cloudflare made Snippets generally available in 2025, running customer JavaScript at the edge. Envoy exposes WebAssembly extensions, though the project still labels that support experimental.

So the demand has been proven for twenty years, by customers paying for appliances partly because they can program them. What has not existed is the same capability on ordinary Linux hosts without buying the appliance, which is the only new part of the current crop.

That gap is now being contested. OpenAI and Cisco's Shirudo, announced in November 2026, puts agent-written eBPF programs on Linux hosts to mitigate vulnerabilities before the patch lands, which is the same argument about the same machines. It works at a different layer: a Shirudo unit attaches at a kernel hook or inside the application, where a programmable firewall rule reads bytes arriving on the wire. Neither the announcement nor the repository README mentions a firewall, a packet or XDP, so the two are adjacent rather than overlapping, and the host is clearly where this category is now being argued.

It is also worth noting what the proven demand is for: not arbitrary computation, but the ability to express the rule your situation actually requires without waiting for a vendor to support it. Nobody buys an appliance in order to write Tcl. They write Tcl because an incident arrived in a shape the configuration language could not describe, and the alternative was a support ticket against someone else's release schedule.

What can a programmable firewall rule do that an nftables rule cannot?

Five categories, and each is something a match expression structurally cannot reach rather than something a particular vendor neglected to implement. The distinction matters because no amount of configuration gets you across it, and because it predicts which feature requests will eventually be granted and which never will. A missing field is a roadmap item; a missing execution model is not.

CapabilityWhat it means in a ruleWhy a match expression cannot do it
State between packetsPer-flow and per-source counters, TTLs, bansAn expression evaluates one packet with no memory
Protocol decodingFollow a TCP stream, decode cleartext HTTP/2 headersDecoding is code, not a field comparison
Rate limiting on your own keyToken buckets keyed on source or anything you computeThe engine offers the keys it was built with
Byte rewritingRedact a pattern, replace a fixed-length match, fix checksumsFilters decide verdicts, they do not modify
CompositionSubroutines, a data stack, branching on computed valuesExpressions have no control flow to compose

The first row is the one that changes most rules in practice. "Ban this source for five minutes after three failed attempts" is a sentence any security engineer can say and most firewall configuration languages cannot express, because the engine has no place to keep the count.

How does a programmable firewall run a rule safely with eBPF?

By compiling to a restricted instruction set and verifying it before it runs, rather than by trusting the author to write careful code. This is the question that should be asked of any product in this category, because the failure mode is severe.

Putting customer code on the packet path is the obvious place for this to go badly, and the history has examples: Suricata's Lua rule support had two sandbox-escape CVEs disclosed in 2026. The mitigations that matter are structural rather than procedural, because a rule that can run arbitrary code in kernel context is one bug away from being the vulnerability it was deployed to stop. Review catches mistakes, but only the shape of the execution environment decides what a mistake is able to reach.

The approach used here is a forward-only cursor machine: a fixed instruction set, one accumulator walking the packet front to back, every jump forward except a bounded call and return. That shape means a program cannot loop indefinitely, and the resulting bytecode is loaded into an eBPF interpreter that the kernel's verifier has already accepted once. Verification happens to the interpreter, not to each rule, so a new rule does not need a new verification pass.

The second safety property is testability. Because a rule compiles to bytecode, the same bytes can run in a plain reference interpreter outside the kernel, which makes a rule something you can exercise in CI before it reaches a machine. That matters more than it sounds for a security control, because it turns "this rule blocks the exploit" from a claim in a change request into a test that either passes or does not, against the actual bytes that will be loaded.

Where does a programmable firewall run on Linux?

In the network driver at XDP, which is before the kernel's network stack has parsed anything at all. The placement buys speed and costs convenience in roughly equal measure, and both halves are worth stating plainly, because the cost is the part that usually gets left out of the pitch and it determines where in your estate the rule can actually be deployed.

XDP is the earliest hook available on the receive path. A program there sees raw bytes off the NIC, and a packet it drops never costs the kernel an sk_buff allocation. That is the cheapest possible place to refuse traffic and the most expensive place to parse it, since nothing is parsed for you.

Two consequences follow, and both belong in any honest description. XDP is ingress-only, so a program there sees traffic arriving and not traffic the host sends; outbound enforcement needs a different hook. And the bytes are whatever is on the wire, so TLS payloads are ciphertext: a rule that reads request contents has to sit behind TLS termination, which on a typical estate means the origin host rather than the edge.

What is the difference between a programmable firewall and a WAF?

Who writes the rules, and therefore what you are actually buying with the money. Framed as a feature comparison the two look similar, since both inspect requests and both block things; framed as a purchase they are plainly different, because one of them arrives with somebody else's threat research already inside it and the other arrives empty.

A WAF is substantially a content business. The value is a maintained rule set, bot intelligence, request normalisation and research you did not do, delivered as updates. You configure which protections apply; you rarely author the detection logic. That is the point of it, and it is why a WAF covers attack classes nobody on your team has heard of, which is a guarantee no engine can make on its own.

A programmable firewall is an engine without the content. You, or an agent working for you, write the rules, which means you can express something specific to your estate in minutes and also means nobody is shipping you protections for threats you have not heard of. Those are different purchases, and in practice most organisations running one still want the other.

The complement is simple: managed content handles the broad, known attack surface, and programmability handles the specific, urgent and local. The split tends to follow the clock as much as the threat, since the vendor's rule pack arrives on its own schedule while the rule for the thing happening to you right now has to come from somewhere else. Where a host firewall sits relative to a WAF covers the placement side of the same question.

Can an AI agent write programmable firewall rules?

Yes, and by late 2026 several vendors ship exactly that, so it is worth being precise about what still differs rather than claiming the capability as novel.

Cato has described an agent that turns a CVE into protection with its researchers reviewing the result, and Miggo's WAF Copilot emits rules for AWS WAF and Cloudflare through a multi-stage pipeline with a live test. In November 2026 OpenAI and Cisco announced Shirudo, described as "an open-source runtime that helps teams protect Linux systems while they roll out patches", where an agent writes a signed eBPF program that attaches at the vulnerable code path in a running process. Agent-written rules are not a differentiator on their own any more.

What varies is where the rule runs and who owns the loop. A rule that is a program rather than an expression gives an agent more to work with, including state and decoding. A rule tested against a reference interpreter can carry a red and green proof in the pull request, so the review is of evidence rather than of intent. And a loop that runs in your repository, with your reviewer and your model, is a different operational position from one that runs inside a vendor's pipeline. Letting an agent write the rule goes through that workflow.

When is a programmable firewall the wrong choice against a WAF rule set?

When the rule you need is one somebody else has already written. A programmable firewall hands you an instruction set, a verifier and a way to test, then expects you to bring the policy, so it is a poor substitute for a maintained rule set and a bad purchase for a team that wanted the research rather than the engine. The phrase describes how a rule gets expressed, not what it protects against.

It earns its place in the opposite case: the rule is specific to your estate, nobody is going to ship it to you, and the vendor's next release is not soon enough. Twenty years of iRules say that demand is real. What is being settled now is where the engine runs, and the 2026 answer is increasingly the host rather than the appliance.

Frequently asked questions

What is a programmable firewall?

A firewall where each rule is a small program compiled to something the data path executes, rather than an expression built from fields the vendor exposed. That lets a rule carry state between packets, decode a protocol, rate limit on a key you choose, or rewrite bytes, none of which a match expression can express.

How is a programmable firewall different from iptables?

iptables and its successor nftables evaluate match expressions over parsed packet fields such as addresses, ports and connection state. A programmable firewall runs code, so it can look inside payloads and keep state. The two layer rather than compete, and the conventional filter handles the larger share of ordinary policy.

Is eBPF a programmable firewall?

eBPF is the mechanism, not the product. It lets you load verified programs into kernel hook points, which is what makes a programmable data path possible on Linux. A programmable firewall built on eBPF adds the rule language, the compiler, the verification story and the operational tooling around it.

Are programmable firewall rules safe to run on the packet path?

They are as safe as the restrictions around them. The relevant properties are a restricted instruction set with no unbounded loops, verification by the kernel before anything runs, and the ability to test a rule outside the kernel first. The counterexample worth knowing is Suricata's Lua rule support, which had sandbox-escape CVEs disclosed in 2026.

Who else sells programmable firewalls?

F5 with iRules and A10 with aFleX have offered traffic-path scripting for years, and Cloudflare made Snippets generally available in 2025. All of those run on the vendor's appliance or network. There is no established analyst category by this name, which is why buyers usually recognise it through the existing one they already have.

Can a programmable firewall decode HTTPS?

Not on the wire, because TLS payloads are ciphertext. The handshake is cleartext, so SNI-based rules work anywhere. Reading request contents requires placing the rule behind TLS termination, which usually means the origin host rather than a device at the perimeter.

What language do you write firewall rules in?

It depends on the product. F5 and A10 use Tcl, Cloudflare Snippets uses JavaScript, Envoy exposes WebAssembly. The implementation described here uses a small C-like language that compiles to bytecode, with a JavaScript value DSL and a functional combinator form that lower to the same builder.

How fast can a programmable rule change take effect?

On this implementation, compiling a rule and swapping it into the running kernel is measured at 3 to 6 milliseconds, with the compile happening off the packet path. The operationally relevant number is usually not that one: it is how long the review takes before the rule is allowed to ship.

Does a programmable firewall replace a WAF?

No. A WAF is largely maintained content: rule packs, bot intelligence and normalisation from the vendor's research. A programmable firewall is an engine with no content, so it covers the rules specific to your estate and leaves the broad known attack surface to the thing that specialises in it.

Is Shirudo a programmable firewall?

No. Shirudo is an eBPF platform for mitigating vulnerabilities on running Linux hosts, announced by OpenAI and Cisco in November 2026. Its unit of deployment, which the announcement calls a shield and the repository calls a upatch, is a signed BPF program attached at a kernel hook or inside the application, and its own threat model is explicit that "shirudo establishes provenance, not correctness", guaranteeing instead that only signed units run and that every change is recorded. Neither the announcement nor the README mentions a firewall, a packet or XDP. It also carries different requirements: the README says it is "pre-release" and that "Production targets require a Linux kernel with the signed-loader ABI and shirudo's kernel patches, plus a TPM 2.0", where a firewall at XDP runs on stock kernels from 6.1 onward.

Can a Shirudo host run other eBPF tools?

Not without signing them. The Shirudo README states that after boot-time initialization "it restricts BPF program loads from userspace to signed loaders", so on an enforcing target only programs signed by the operator can load. That is a deliberate and strong property, and it is worth knowing before adoption, because existing eBPF tooling on that host has to be brought into the same signing scheme rather than simply installed.

Can a programmable firewall filter outbound traffic?

Not from XDP, which is an ingress hook on the receive path. Outbound enforcement from eBPF uses a different attachment point, either TC on the egress path or cgroup_skb at the socket layer, which operates per cgroup rather than per process.

Sources

Related resources