Stateful inspection is a firewall technology that tracks the state of active connections and determines which network packets to allow through the firewall. Unlike simple packet filtering, stateful inspection understands the context of traffic and ensures that only packets belonging to an established session are permitted.