
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. Where each one stands, which decides what it can see. A network firewall sits between networks and inspects traffic in transit, so it sees addresses, ports and TLS records, and it only sees traffic that crosses it. A host firewall runs on the machine receiving the traffic, so it sees every connection that arrives there including the ones from your own services, and on an origin behind TLS termination it sees the request in cleartext. The textbook comparison stops at "one is on the network, one is on the host". The differences that decide which rules you can actually write are encryption, east-west visibility, and whether the sender's identity survives the trip through your load balancer.
I build eBPF tooling at yeet, and this comparison usually comes up sideways: somebody has a rule they want to write and cannot work out which box it belongs in. The answer is almost always determined by what the box can see rather than by what it can do.
Placement, and every other difference follows from it. That sounds like a technicality and it is the whole answer: what each one is able to see decides which rules it can enforce.
The standard definitions are location-based and both are accurate as far as they go. A network-based firewall is positioned between two or more networks and controls the flow of data between them. A host-based firewall is deployed directly on the host itself, as a daemon or service in the operating system, controlling traffic to and from that machine. NIST's glossary puts the second one as "a software-based firewall installed on a server to monitor and control its incoming and outgoing network traffic", citing SP 800-41 Rev. 1, which has treated host-based firewalls as a distinct category since 2009.
| Network firewall | Host firewall | |
|---|---|---|
| Sits | Between networks, in the traffic path | On the machine receiving the traffic |
| Protects | Everything behind it, as one policy | One host, with a policy shaped to it |
| Sees | Traffic that crosses it, mostly encrypted | Every connection arriving at that host |
| Identifies senders by | Address, which behind a proxy is the proxy | Address plus local context: cgroup, uid, socket |
| Fails | Closed for the whole estate | Closed for one machine |
| Operational cost | One place to change a rule | A rule on every host, and a way to roll it out |
Reading the "sees" row carefully is most of the work. A network firewall sees a large volume of traffic shallowly; a host firewall sees one machine's traffic deeply. Neither of those is better, and the rule you are trying to write usually needs one or the other specifically. The practical consequence is that arguments about which firewall to buy are usually arguments about a rule somebody has already tried and failed to write, and the failure was a visibility problem rather than a product problem.
Only if it becomes the TLS endpoint itself, which is a considerably bigger commitment than the feature name suggests. This is the difference that decides more rules than any other, and the textbook comparisons tend to skip it.
On the wire a TLS connection is ciphertext. The handshake is not: the ClientHello carries the SNI and the cipher list, which is enough for destination rules and JA3-style fingerprinting. Everything after it, the method, the path, the headers and the body, is encrypted. RFC 8446 defines TLS 1.3 and the point in the handshake after which records are protected, and RFC 6066 defines the server_name extension that leaves the destination readable in the clear.
Next-generation firewalls solve this with TLS inspection, which is a termination proxy: the firewall decrypts, inspects, and re-encrypts on the way out. It works and it is widely deployed, and the costs are the part that rarely makes the comparison table. It means running a certificate authority every client must trust, absorbing the re-encryption cost on every connection, and creating a box that holds plaintext for traffic it does not own, which is a new place for that plaintext to leak from and a new thing to keep patched.
A host firewall on an origin behind TLS termination gets the same visibility for free, because the traffic was already decrypted before it arrived. Nothing is intercepted, no certificate authority is involved, and the firewall simply sits after the point where decryption had to happen anyway. This is the single largest practical difference between the two and the one textbook comparisons rarely mention: the network device has to build an interception apparatus to read what the host can already see, which is why so many rules that sound simple at the edge turn out to require a project.
Because east-west traffic does not cross the perimeter, so there is simply nothing there for the device to inspect. No configuration fixes an appliance's inability to see packets that never reach it.
North-south traffic crosses the boundary between your estate and the outside world. East-west traffic runs between your own workloads: your API calling your search service, a worker reading a queue, one pod talking to another. A perimeter firewall sees the original request arriving and the response leaving, and none of the internal calls in between, which in a service-oriented architecture is the large majority of the connections involved in serving that one request.
That matters because lateral movement lives there. Zero Networks' 2026 Lateral Movement Exposure Report, built from telemetry across 312 live enterprise environments, found that a single compromised host can reach a median of 85% of internal systems on the first hop. It also reports that 87% of monitored servers accept inbound RDP or SSH from many internal sources. Those are vendor figures from observational telemetry rather than an independent survey, and they describe the shape of the problem rather than measuring your estate.
A host firewall sees east-west traffic by definition, because it sees whatever arrives at its machine regardless of where it came from. That is not a claim about being better; it is a claim about where the packets physically go. It also means the coverage question changes shape: a perimeter device protects everything behind it once installed, while host enforcement covers exactly the machines that run it, so an estate-wide picture depends on rollout rather than placement.
Because the balancer terminates the client's connection and opens a separate one to your origin, so at the network layer the balancer is the source. Nothing is misconfigured; the address is accurate and not the one you wanted.
This breaks a specific and common class of rule. "Rate limit this source" at the perimeter rate limits the balancer. "Block this IP" blocks nothing useful if every connection arrives from the same handful of addresses. The original address survives only in a forwarded header or the PROXY protocol, and trusting a header is only safe when you know which hop set it.
A host behind a known balancer knows which hop set the header, because it knows what sits directly in front of it. A device on the wire generally does not, which is why source-aware rules are easier to write correctly on the origin than at the edge, and why the same rule can be trustworthy in one position and spoofable in another.
Local context goes further than the address. A host firewall can match on the socket's owning cgroup or uid, so a rule can name a container, a systemd unit or a user. That is the handle workload isolation is built on, and it has no perimeter equivalent because the perimeter has no idea which process either end belongs to.
Pick by what the rule needs to see rather than by which product is stronger, and in most estates the answer turns out to be both with a clear division of labour.
Use the network firewall for policy that applies to everything behind it, for absorbing traffic before it reaches your machines, and for the aggregate view. A volumetric attack spread across a fleet looks like modest traffic at every host and an obvious attack at the edge. Traffic dropped at the perimeter costs the origins nothing.
Use the host firewall when the rule concerns one workload rather than the estate, when it needs the decrypted request, when it covers east-west traffic that never reaches the edge, or when it needs to know which local process is involved.
The combination most teams land on is a perimeter device for volume and broad policy, plus host rules for the specific and the internal, with each one asked only for the decisions it has the visibility to make. What a WAF buys you is a third thing again: maintained rule content rather than a placement, which is why it sits alongside both rather than replacing either.
Three things, and together they are the argument for layering the two rather than replacing one with the other. Anyone selling host enforcement as a perimeter substitute is skipping all three.
The aggregate view. One host sees its own traffic and nothing else, so a pattern that is obvious across a fleet is invisible at every individual machine in it. Spotting it means shipping counters somewhere central and correlating them there, which is a separate system from the enforcement and one more thing to run.
Everything before the host. A host firewall only decides about traffic that already traversed your network and arrived at the machine, which means the bandwidth was already spent and the links were already loaded. It is the wrong instrument for absorbing a flood, because by the time the rule runs the flood has already done the expensive part of its work.
One place to change a rule. Host enforcement means the rule exists on every machine, so you need a way to roll it out, confirm it landed and roll it back. That is tractable, and it is real work the perimeter does not ask of you.
Yes, and the attachment point changes what each decision costs as well as when it happens. Linux offers two useful places, and they suit different kinds of rule.
iptables and nftables attach at netfilter hooks, after the kernel has parsed the packet and conntrack has placed it in a flow. That parsing is why those rules can match on connection state so conveniently: the work of deciding which flow a packet belongs to has already been done for you, and the rule reads fields the stack has already extracted. You pay for that convenience in the allocation that had to happen first.
XDP attaches earlier, in the network driver, before the kernel allocates an sk_buff. A program there sees raw bytes: worse for everything nftables is good at, because nothing is parsed for you, and better for anything above layer 4, because you are not limited to the fields the stack exposes. For volumetric drops the saving is the point, since the cheapest packet is the one the kernel never builds a structure for.
One limit on that placement is worth stating plainly, because it is easy to miss when comparing hooks: XDP is an ingress hook, so it sees traffic arriving at the interface and never the traffic the host itself sends. Anything that needs to constrain what a workload reaches out to has to attach somewhere else entirely, and outbound policy lives elsewhere for exactly that reason.
Before the decision procedure, it helps to see the common rules laid out against the placement each one actually requires, with the gap that placement leaves. The third column is the one worth reading twice, because it is where most disappointment with a firewall purchase originates: every placement covers something and misses something, and the miss is rarely mentioned at the point of sale.
| Rule you want to write | Where it can be enforced | What that placement does not cover |
|---|---|---|
| Block a country or an address range | Network firewall, at the edge | Nothing about the request itself, and nothing between your own services |
| Rate limit a specific client | Edge, only if the client address survives the proxy | Behind a load balancer the source is the balancer, so the limit applies to it |
| Match a path, header or request body | Host, behind TLS termination | Traffic to other hosts, and anything the terminator never decrypts |
| Stop one service calling another | Host, on either end | Nothing, if only some hosts run the agent |
| Absorb a volumetric flood | Network firewall, before your links | The bandwidth is already spent by the time a host rule runs |
| Name a container, unit or user in the rule | Host, using cgroup or uid | No perimeter equivalent exists, so the edge cannot express it at all |
Put it where the data the rule depends on is actually readable. That reduces to four questions, and working through them in order resolves most arguments about where a rule belongs.
Most rules that feel impossible to write are rules being attempted at step one when they belong at step two or three. The box is not failing and the vendor is not holding out on you; it is being asked a question about traffic it cannot see, and no amount of configuration changes what physically reaches it. Moving the rule is usually faster than escalating the ticket.
Host and network firewalls are not competing products, and the comparison is not about features. A network firewall sees a lot of traffic shallowly and only the traffic that crosses it. A host firewall sees one machine's traffic deeply, including the east-west calls that never go near the perimeter and, behind a TLS terminator, the decrypted request itself. The question to ask of any rule you cannot write is not which firewall is better but which one can see the thing the rule is about.
Placement, which determines visibility. A network firewall sits between networks and inspects traffic in transit, so it sees addresses and ports but mostly encrypted payloads, and only traffic that crosses it. A host firewall runs on the receiving machine as a daemon or service, so it sees every connection arriving there, including internal ones, with local context such as the owning process.
In most estates, yes, because they cover different traffic. A perimeter device never sees calls between your own services, cannot read encrypted payloads without becoming a TLS endpoint, and identifies senders by an address that a load balancer replaces. Host rules cover those three cases and leave volume and broad policy to the edge.
Only at a point where the traffic is decrypted. On the wire it is ciphertext apart from the handshake, where the ClientHello exposes the SNI. A network firewall reads payloads by terminating TLS itself, which means running a trusted certificate authority. A host behind a TLS terminator reads the same request without intercepting anything.
Traffic between workloads inside your estate, as opposed to north-south traffic crossing its boundary. It matters because a perimeter device cannot see it and because lateral movement happens there. Zero Networks' 2026 telemetry report puts a single compromised host within reach of a median of 85% of internal systems on the first hop.
It depends where it attaches and how narrow the match is. A program at XDP runs in the driver before the kernel builds packet structures, so dropped traffic costs less than it would at a netfilter hook. The cost that matters in practice is per-packet evaluation on traffic you pass, which makes early exits and narrow matching more important than the hook.
Because a proxy or load balancer terminates the client connection and opens its own, so the balancer is the source as far as the network layer is concerned. Recovering the original address means reading a forwarded header or the PROXY protocol, which is only trustworthy when you control the hop that set it.
It can reduce it, by restricting which workloads a host accepts connections from and on which ports. What it cannot do by itself is constrain traffic over a connection the policy permits, which is why segmentation is usually paired with something that inspects the content of allowed sessions.
Neither category describes it well. A WAF is an application-layer filter, usually deployed at the edge or as a reverse proxy, and what you are mostly buying is maintained rule content rather than a placement. It answers a different question from either firewall type and commonly runs alongside both.
iptables and nftables are the kernel's packet filtering frameworks, matching parsed fields at netfilter hooks, with nftables the current default. An eBPF program attaches at a different point, such as the driver at XDP, and runs code rather than evaluating a match expression, which lets a rule read the payload and keep state.
Yes, and it is the normal arrangement. They sit at different points in the path and do not conflict: the perimeter device filters before traffic reaches your network, and the host rules apply to whatever arrives. Running both is layering rather than redundancy, because each covers traffic the other cannot see.
server_name extension, and why SNI is readable in the cleartext ClientHello.nft(8). The hooks a conventional Linux host firewall attaches to.sk_buff allocation.l7-firewall-in-the-kernel. The origin-host placement described here, running behind a customer's TLS termination.