“We have a firewall” can mean very different things. A router access list, a cloud security group, a Linux host firewall, a branch-office UTM box and a ₹40 lakh data-centre appliance are all called firewalls. The useful way to tell them apart is not the brand or price but two questions: how much does the device remember about a conversation, and how far into each packet does it read?
Generation one: the stateless packet filter
A stateless packet filter judges each packet in isolation. It reads the header fields: source and destination IP address, protocol, source and destination port, and perhaps TCP flags. It compares them with an ordered list of rules and permits or drops the packet. It remembers nothing.
That lack of memory creates an awkward problem. Suppose an office wants staff to browse the web. Outbound packets to port 443 are easy to allow. But replies come back from port 443 to a random high port on the laptop. A stateless filter cannot know those replies belong to a conversation the laptop started, so the administrator has to allow inbound traffic from source port 443 to high ports. An attacker who sends packets with source port 443 now walks through that hole. Administrators used to approximate the fix by allowing inbound TCP only when the ACK flag was set, which blocks new inbound connection attempts but still lets crafted packets through.
Stateless filters are still everywhere because they are fast and cheap: router ACLs, some cloud network ACLs (AWS network ACLs, for instance, are stateless while security groups are stateful), and high-speed filtering in front of DDoS-exposed links. They are fine for coarse rules like “drop anything from these ranges” but awkward for anything conversational.
Generation two: stateful inspection
A stateful firewall keeps a table of active connections. When a laptop sends a SYN to a web server and the rule allows it, the firewall records the connection: the two addresses, the two ports, the protocol and the TCP state. Return packets are checked against that table and allowed only if they belong to a known connection in the right state. Nothing else gets in.
The rule base becomes much simpler and much safer. You write “inside users may connect out to 443” and the reply traffic is handled automatically. Unsolicited inbound packets with fake flags are dropped because they match no entry. For UDP, which has no connection, the firewall creates a pseudo-connection when the first outbound packet passes and expires it after a short idle timeout.
The cost is memory. The connection table has a finite size, which makes the firewall itself a target for state-exhaustion floods. It also means timeouts matter: a database session idle longer than the firewall’s TCP timeout will be silently dropped from the table, and the application sees a mysterious broken connection the next time it sends a query. This is a classic support ticket between application and network teams.
Generation three: next-generation firewalls
Stateful firewalls still decide by addresses and ports. By the late 2000s that stopped matching reality: almost everything, from business SaaS to personal file sharing to malware command channels, ran over 80 and 443. “Allow 443” effectively meant “allow everything”.
Next-generation firewalls (NGFWs) add three capabilities on top of stateful inspection:
- Application identification. The firewall inspects traffic patterns and protocol details to recognise the application, so a rule can say “allow Microsoft 365, block personal cloud storage” regardless of port.
- User identity. By integrating with Active Directory or an identity provider, rules can refer to groups such as “Finance” instead of IP ranges, which matters when laptops move between Wi-Fi networks and DHCP addresses change.
- Integrated threat prevention. Intrusion prevention signatures, URL categorisation, malware scanning of files in transit, and often TLS decryption so that the firewall can inspect encrypted traffic.
Unified threat management (UTM) appliances, common in Indian SMB offices, bundle similar features into a single box aimed at smaller sites. The distinction between UTM and NGFW today is mostly marketing and scale.
Side by side
| Question | Stateless | Stateful | NGFW |
|---|---|---|---|
| Remembers connections? | No | Yes | Yes |
| Knows the application? | No, guesses from port | No, guesses from port | Yes, from traffic content |
| Knows the user? | No | No | Yes, with directory integration |
| Sees inside encrypted traffic? | No | No | Only with TLS decryption enabled |
| Performance cost | Lowest | Moderate | Highest, especially with decryption and threat features on |
The fine print on throughput
Datasheets usually headline firewall throughput with large packets and basic stateful inspection. Turning on application identification, intrusion prevention and TLS decryption can reduce real throughput dramatically; the drop varies widely by vendor and traffic mix. An appliance sized from the headline number can become a bottleneck the day the security team enables the features it was bought for. Vendors usually publish a separate “threat protection” throughput figure, and that is the one to size against, ideally after testing with your own traffic.
What no firewall type solves
Every firewall enforces policy at a point in the network. Traffic that never crosses that point is invisible to it. Two laptops on the same VLAN talk directly through the switch; a firewall at the internet edge never sees it. Traffic between virtual machines on one host may never touch a physical device. Users on home Wi-Fi reaching SaaS directly bypass the office firewall entirely.
This is why modern designs add host-based firewalls on servers and endpoints, segment internal networks with internal firewalls, and move some inspection into cloud-delivered security services that follow the user. The firewall at the perimeter remains useful; it is just no longer the only gate.
Written by the RP Strativa Team. The appliance price mentioned is illustrative.
Leave a Reply