Glossary

Next-Generation Firewall (NGFW)

A next-generation firewall combines stateful packet filtering with deeper inspection, so rules can name applications, users and known attack patterns instead of only addresses and ports.

What makes a firewall next generation?

The term was coined by industry analysts around 2009 for products that went beyond allowing TCP 443 and blocking the rest. By then almost every application tunneled over web ports, so a rule that only knew port numbers could not tell a payroll site from a file sharing tool. An NGFW identifies the application inside the flow, ties connections to the user who made them, checks traffic against signatures of known attacks, and can decrypt TLS to look inside. The stateful core is still there underneath, as described on Firewall.

Which features are usually bundled?

FeatureWhat it doesTypical open source equivalent
Application identificationRecognizes protocols and apps by behavior, not portnDPI library, Suricata app-layer detection
Intrusion prevention (IPS)Matches packets against attack signatures and drops them inlineSuricata or Snort in inline mode
TLS inspectionDecrypts, scans and re-encrypts sessions with a local CASquid ssl-bump, specialized proxies
User identity rulesWrites policy for groups instead of IP addressesProxy authentication tied to a directory
URL and reputation filteringBlocks categories and known bad hostsDNS filtering lists, proxy ACLs
SandboxingDetonates suspicious files in an isolated VMSeparate malware analysis tools

How does intrusion prevention work in practice?

The engine reassembles TCP streams, parses protocols such as HTTP, DNS and TLS, and compares what it sees with thousands of rules. A rule might match a specific exploit string in a URL, an odd certificate field, or a DNS query for a domain tied to malware. In detection mode it only logs; in inline mode the kernel hands packets to the engine through NFQUEUE and the engine returns a verdict before the packet moves on. Tuning matters: a fresh ruleset on a busy web server produces alerts for harmless traffic, so most teams start in alert mode and disable noisy rules before switching to blocking.

Can I build NGFW-style protection on a Linux server?

Yes, for a single host or a small gateway. Suricata is the usual engine. A compact inline setup on Debian or Ubuntu looks like this:

apt install -y suricata
suricata-update                       # fetch the open ruleset
sed -i 's/^\(\s*\)- interface: eth0/\1- interface: eno1/' /etc/suricata/suricata.yaml
nft add table inet ips
nft add chain inet ips fwd '{ type filter hook forward priority 10; }'
nft add rule inet ips fwd queue num 0 bypass
suricata -c /etc/suricata/suricata.yaml -q 0 -D
tail -f /var/log/suricata/fast.log

The bypass flag lets traffic continue if Suricata stops, which favors availability. Drop it if you prefer to fail closed. For traffic to the box itself, hook the input chain instead of forward.

Does TLS inspection make sense on a server?

Mostly no. On an office gateway, inspection lets the firewall scan downloads that would otherwise be opaque, at the cost of installing a company root certificate on every client. On a public server you already terminate TLS yourself, so the decrypted traffic is available at the reverse proxy; a web application firewall in that spot sees the plain requests without any interception trick. Web Application Firewall covers that approach, and TLS Handshake explains why interception needs a trusted CA.

How do user identity rules work without a corporate network?

Gateway products usually learn who is behind an address from a directory login or an agent on each laptop. On a self-built setup the simplest equivalent is authentication at the proxy or tunnel: each person gets their own WireGuard key or proxy account, and each key maps to a fixed tunnel address. Firewall rules can then name those addresses, which in practice means naming people. Removing a key cuts off one person without touching anyone else, and the logs record which key made each connection, which is most of what identity-aware policy is meant to give you.

What are the trade-offs?

  • CPU: deep inspection costs far more per packet than plain filtering. Throughput figures for IPS are often a fraction of a device's plain firewall rate.
  • False positives: inline blocking can break legitimate traffic, so rules need a review cycle.
  • Visibility limits: encrypted protocols that resist interception, such as certificate-pinned apps, remain opaque.
  • Operations: rule updates, log storage and alert triage are ongoing work rather than a one-time install.

How much hardware does a software NGFW need?

Suricata scales across cores with worker threads, and its memory use grows with the ruleset and the number of tracked flows. For a few gigabits of mixed traffic, the S4 (8 cores, 64 GB DDR4) is a sensible start. A gateway inspecting 10 Gbps or more benefits from many cores, such as the D3 with 56 cores, or the X2 with 96 efficient cores for highly parallel rule matching.

Machines With the Cores for Inline Inspection

ServerProcessorCores / threadsMemoryStorageNetworkPer monthSmallest order
S4Intel Xeon E-2388G8 / 1664 GB DDR41x 1 TB NVMe2x 10 Gbps$87.52$87.52 (1 month)
S6Intel Xeon E-2288G8 / 1664 GB DDR42x 1 TB NVMe2x 10 Gbps$89.92$89.92 (1 month)
D32x Intel Xeon Gold 6258R56 / 112128 GB DDR42x 1 TB NVMe2x 25 Gbps$275.32$275.32 (1 month)
X2Intel Xeon 6731E96 / 96256 GB DDR52x 2 TB NVMe2x 25 Gbps$665.87$665.87 (1 month)

Keep Reading

Firewall

What a firewall does, packet filters versus stateful and application firewalls, and the Linux tools that set the rules on a dedicated machine.

Open

Web Application Firewall

A filter that reads HTTP requests before your app does, blocking injection and abuse, and how to run one in front of your site.

Open

Perimeter Firewall

The filter at the edge between a trusted network and the internet, how the idea maps onto one rented machine, and its limits.

Open

iptables basics

How iptables tables, chains and targets fit together, plus a minimal default-deny rule set for a new bare metal server.

Open

FAQ

Quick Answers

A stateful firewall decides by address, port and connection state. An NGFW also identifies applications, users and attack signatures.

It is the inspection engine part. Combined with nftables for filtering and a proxy for user rules, it covers most NGFW features on Linux.

It adds CPU work and some latency per packet. Sizing the core count to the traffic volume keeps the effect small.

You already do at the reverse proxy. Inspect requests there with a web application firewall instead of intercepting connections.

With the NFQUEUE bypass option traffic keeps flowing uninspected. Without it, traffic stops until the engine is back.