1.what is firewall ?

A firewall is a security system either software, hardware, or both that monitors and controls incoming and outgoing network traffic based on a set of predefined rules.

Think of it as a gatekeeper between two networks (e.g., your server and the internet, or your internal network and an external one). It decides what traffic is allowed through and what gets blocked

2. how firewall invented?

  1. Internet started connecting different orgs' networks together (late 80s)
  2. This broke the trust assumption now unknown/untrusted machines could reach yours
  3. Morris Worm (1988) one of first major worms, crashed thousands of machines, exposed how vulnerable connected networks were
  4. Realization: securing every single machine individually too hard, too unreliable
  5. Better solution: control all traffic through one single checkpoint (like a gate)
  6. Term "firewall" borrowed from building construction a wall that stops fire from spreading room to room
  7. Same logic applied to networks stop bad/malicious traffic from spreading between networks

3. so where the firewall is installed (deployment) ?

  1. Network based firewall
  2. host based firewall

Network-based firewall : protects an entire network at once, sitting at the entry/exit point (like a router or gateway). One firewall, many machines protected.

what it does ?

it continiously monitor the incomming traffic, port number,ip address, protocoal and allow or block based on predefined rules.

Host-based firewall : protects just one single machine/device, installed directly on that machine's OS.

what it does ?

it also continiously filter the incomming traffic allowing and blocking the ports and inspect the application overally what we have to understand is it is used to protect the delicated machines

for better understanding lets go through the given figure