A firewall is a system that provides network security by filtering incoming and outgoing network traffic. Its purpose is to reduce unwanted network communications while continuing to allow communication to flow freely.
The different types of firewalls consist of:
- packet filtering (stateless): works by inspecting individual packets in isolation
- stateful: are able to determine the connection state of packets making them much more flexible
- application layer: analyzes data being transmitted allowing network traffic to be matched against firewall rules
Firewalls are often executed by packet filtering.The system examines each packet entering or leaving the network and accepts or rejects it based on user-defined rules.