Network Kings, India’s Leading IT Career Training Academy
A firewall is a device or software application that is used for network security. It helps to monitor and control the incoming and outgoing network traffic based on some pre-defined security policies Its purpose is to establish a barrier between a trusted internal network and an untrusted external network such as the internet and to prevent unauthorized access while allowing the authorized communication to pass through. So it functions by creating a trusted and untrusted zone. Most firewalls allow traffic from the trusted zone (authorized zone) to the untrusted zone but traffic from the untrusted zone to the trusted zone is denied.
Firewalls also have a less trusted zone which is called a Demilitarized zone.
Some value is assigned to the interface of these zones and the traffic from lower security value is not allowed to the higher security value by default and requires some permission. But the traffic from a higher security zone is allowed to the lower security zone. The flow of traffic can be manipulated as per the need.

Network Security: A firewall acts as the first line of defense against cyber threats, malicious attacks, and unauthorized access attempts from the internet or untrusted zone/network. A firewall helps in monitoring incoming and outgoing traffic, filtering and blocking potentially harmful or suspicious data packets based on predefined security rules.
Access Control:- Firewalls implement access control policies allowing administrators to define and manage rules that determine which network traffic is permitted or denied. This control helps in regulating who and what can access the network, safeguarding against unauthorized users and potential threats.
Protection of sensitive data: A firewall helps in protecting the sensitive data and resources within a network by preventing unauthorized access to confidential information, proprietary data, personal details, or financial records. By controlling access to resources, firewalls help maintain data confidentiality and integrity.
Prevention of malware and cyber attacks:- Firewalls help prevent malware viruses worms, ransomware, and other malicious software from infiltrating the network by blocking known malicious traffic patterns or infected files from entering the system.
Network Segmentation:- They Facilitate network segmentation by dividing the network into separate zones or segments each with its security policies. This isolation helps contain potential threats and limit the impact of security breaches.
Compliance and regulatory requirements:- Many industries have specific security standards and compliance regulations that require the implementation of firewalls as part of their security measures. Compliance with these standards ensures adherence to security best practices.
Protection of Endpoint:- In addition to network-level protection firewalls on individual devices or endpoint firewalls offer an additional layer of security by monitoring traffic specific to that device and preventing unauthorized access or attacks targeting the endpoint.
Rule 1:- Allow Destination Address 172.16.1.5
Rule 2:- Deny Destination Address 172.16.1.5
since the rule list is viewed from top to bottom, the packet with destination address 172.16.1.5 will be allowed even though you have denied it in rule 2.
Hence the order of rule is of utmost importance.