A firewall is a software or hardware or can be a combination of both that acts as the first line of defense in a network. It monitors incoming and outgoing network traffic and decides whether to allow or block specific traffic based on a defined set of security rules.
It prevents unauthorized access to a network by establishing a barrier between secured and controlled internal networks that can be trusted and untrusted outside networks, such as the Internet.
There are several types of Firewall and the main types are:
Packet-Filtering Firewall that examines packets in isolation and does not know the packet's context.
Proxy Firewall (aka application-level gateway) inspects packets at the application layer of the Open Systems Interconnection (
OSI) reference model.
Stateful Inspection Firewall examines network traffic to determine whether one packet is related to another packet.
Next-Generation Firewall (NGFW) uses a multilayered approach to integrate enterprise firewall capabilities with an intrusion prevention system (IPS) and application control.