What Is a Stateful Firewall? | Fortinet (2024)

How a Stateful Firewall Works

A stateful firewall collects data regarding every connection made through it. All of these data points form profiles of “safe” connections. When a subsequent connection is attempted, it is checked against the list of attributes collected by the stateful firewall. If it has the qualities of a safe connection, it is allowed to occur. If not, the data packets are discarded. Data packets contain information about the data within them. A stateful firewall performs packet inspection, which checks the contents of packets to see if they pose threats.

Stateful firewalls can also integrate additional services, such as encryption or tunnels. These boost performance because they block malicious actors from reading the contents of communications, thereby making the connection safer through access control.

Stateful packet inspection

Stateful packet inspection is a technology used by stateful firewalls to determine which packets to allow through the firewall. It works by examining the contents of a data packet and then comparing them against data pertaining to packets that have previously passed through the firewall.

Stateful packet filtering keeps track of all connections on the network, making sure they are all legitimate. Network-based static packet filtering also examines network connections, but only as they come in, focusing on the data in the packets’ headers. This data provides less information to the firewall, limiting it to where it came from and where it is going.

Transport Control Protocol (TCP)

TCP is one of the primary protocols the internet uses to send and receive data, allowing data to be sent and received at the same time. In addition to helping transmit information, TCP contains data that can result in a reset (RST) of the connection, stopping it completely. TCP also dictates when the transmission should end with a FIN (finish) command. It groups data into packets, and when they arrive at the destination, the packets are reassembled into data the receiver can understand.

Stateful firewalls use TCP traffic to keep track of connections by examining the contents of the packets created in the TCP process. The three stages of a TCP connection—synchronize (SYN), synchronize-acknowledge (SYN-ACK), and acknowledge (ACK)—are used by a stateful inspection firewall to identify the parties involved in order to spot a potential threat. If signs of a bad actor are revealed as the TCP handshake takes place, the stateful firewall can discard the data.

Three-way handshake

The three-way handshake involves both sides of the data transmission process synchronizing to initiate a connection, then acknowledging each other. In this process, each side transmits information to the other side, and these are examined to see if anything is missing or not in the proper order.

As the handshake occurs, a stateful firewall can examine the data being sent and use it to glean information regarding the source, destination, how the packets are sequenced, and the data within the packet itself. If threats are detected, the firewall can reject the data packets.

What Is a Stateful Firewall? | Fortinet (2024)

FAQs

What Is a Stateful Firewall? | Fortinet? ›

A stateful firewall

stateful firewall
Adjective. stateful (not comparable) (computing) That supports different states, reacting to the same input differently depending on the current state. (obsolete) Full of state; stately.
https://en.wiktionary.org › wiki › stateful
is a kind of firewall that keeps track and monitors the state of active network connections while analyzing incoming traffic and looking for potential traffic and data risks. This firewall is situated at Layers 3 and 4 of the Open Systems Interconnection (OSI) model.

What is a stateful firewall? ›

A stateful firewall inspects everything inside data packets, the characteristics of the data, and its channels of communication. Stateful firewalls examine the behavior of data packets, and if anything seems off, they can filter out the suspicious data.

What is stateful in security? ›

Stateful inspection, also known as dynamic packet filtering, is a firewall technology that monitors the state of active connections and uses this information to determine which network packets to allow through the firewall.

What is the use case of stateful firewall? ›

Stateful firewalls gather data about all active connections.

Stateful firewalls also apply packet inspection for incoming traffic. Packet inspection looks inside each packet to assess the contents. If the packet contains malicious code, the firewall blocks access.

How do I know if my firewall is stateful? ›

Stateful firewalls are capable of monitoring and detecting states of all traffic on a network to track and defend based on traffic patterns and flows. Stateless firewalls, however, only focus on individual packets, using preset rules to filter traffic.

What does stateful mean? ›

Adjective. stateful (not comparable) (computing) That supports different states, reacting to the same input differently depending on the current state. (obsolete) Full of state; stately.

What is one limitation of a stateful firewall? ›

Inadequate Web Application Security

Many stateful firewalls are not designed to provide security for web applications, which often utilize dynamic port numbers and complex interactions that extend beyond traditional network protocols.

What are examples of stateful? ›

Here are some popular examples of stateful applications:
  • Online shopping carts that keep track of what you put in them.
  • Banking systems that keep track of account information.
  • Social media sites that display information based on user's preferences.
Nov 2, 2023

What is stateful connection? ›

A stateful connection is one in which some information about a connection between two systems is retained for future use. In some cases, the connection is kept open even though the two systems might not be transmitting information (i.e., the connection itself retains state).

What is stateful mode? ›

Stateful means that the computer or the program keeps track of interactions, usually by setting values in a storage field designated for that purpose. Stateless means that there is no record of previous interactions.

Which of the following best describes a stateful firewall? ›

Final answer: A stateful packet inspection firewall is best described as a type of firewall that examines each packet, denying or permitting access based not only on the examination of the current packet, but also on data derived from previous packets in the conversation.

What is the difference between stateful and stateless? ›

Functions and design patterns can also be stateful or stateless. The key principle behind something that is stateful is that it has perfect memory or knowledge of previous calls or requests, while something that is stateless has no memory or knowledge of previous calls or requests.

Is Windows Firewall stateful? ›

Firewall Basics

The Windows Defender Firewall is a stateful firewall. This means that you can create a rule to allow inbound traffic, and established traffic will automatically be let back out. If you create an outbound rule, traffic going out will automatically be allowed back in.

What is a stateful firewall system? ›

A stateful firewall is a kind of firewall that keeps track and monitors the state of active network connections while analyzing incoming traffic and looking for potential traffic and data risks.

Is a stateful firewall safe? ›

By maintaining connection states, stateful firewalls can identify and block unauthorized or suspicious network traffic. They can also prevent various types of attacks, such as IP spoofing, port scanning, and connection hijacking.

How do I set up a stateful firewall? ›

To configure a stateful firewall rule:
  1. Configure a name for the stateful firewall rule. ...
  2. Specify the traffic flow direction to which the stateful firewall rule applies. ...
  3. Configure a name for a policy. ...
  4. Specify the destination address of the flows to which the policy applies.

Is Windows Defender a stateful or stateless firewall? ›

The Windows Defender Firewall is a stateful firewall. This means that you can create a rule to allow inbound traffic, and established traffic will automatically be let back out. If you create an outbound rule, traffic going out will automatically be allowed back in.

How is a stateful firewall different from an IPS? ›

Firewalls serve as barriers to stop unauthorized users from accessing networks, whereas IDS/IPS monitors network activity to give a deeper examination and identification of possible security concerns.

What is the difference between stateful and static firewall? ›

Stateless firewalls are designed to protect networks based on static information such as source and destination. Whereas stateful firewalls filter packets based on the full context of a given network connection, stateless firewalls filter packets based on the individual packets themselves.

Top Articles
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 6745

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.