A firewall is a network security device; it is a protective layer for the server that monitors and filters all the incoming and outgoing network traffic. It uses a set of rules to determine whether to allow or block a specific network traffic. Firewalls can prevent unauthorized use before reaching the servers. Firewalls can be hardware or software-based.
To protect private networks and individual machines, a firewall can be employed to filter incoming or outgoing traffic based on a predefined set of rules known as firewall policies.
Packet flowing through a firewall can have one of the following three outcomes −
Properties of the packets and the protocols are −
A packet filter firewall can forward or block packets based on the information in the network layer and transport layer headers source and destination IP addresses, source, and destination port address, and type of protocol (TCP and UDP).
A packet filter firewall is a router that uses a filtering table to decide which packet must be discarded or not to forward. It filters at the network or transport layer.
A proxy-based firewall acts as an intermediary between the requested data by the end-users and the source servers. The proxy filters all the network traffic and will block or allow the traffic based on its rules and policies.
The proxy can also examine the entire network packet besides the network address and the port number. This type of firewall is labeled as the most secured, as it prevents direct network contact between the systems.