A stateful firewall is a network security system that monitors and controls incoming and outgoing network traffic based on the state of the connection. It keeps track of each connection’s state, source and destination addresses, port numbers, and the type of protocol used. For example, a stateful firewall would allow a web server to send a response to a web browser request but would block any other incoming traffic from that same source.
A stateless firewall is a network security system that monitors and controls incoming and outgoing network traffic without keeping track of the state of the connection. It only looks at the source and destination addresses, port numbers, and the type of protocol used. For example, a stateless firewall would allow any incoming traffic from a certain source, regardless of whether or not it is related to a previous connection.