As its name suggests, a firewall acts as a barrier between networks or parts of a network, blocking malicious traffic or preventing hacking attempts.
A network firewall is installed on the boundary between two networks. This is usually located between the Internet and a company network.
It can be a piece of hardware or software running on a computer that acts as a gateway to the company network.
A client firewall is software that runs on an end user’s computer, protecting only that computer.
In either case, the firewall inspects all traffic,
both inbound and outbound, to see if it meets certain criteria. If it does, it is allowed; if not,
the firewall blocks it.
Firewalls can filter traffic based on:
The source and destination addresses and port numbers (address filtering)
The type of network traffic (e.g., HTTP or FTP protocol filtering)
The attributes or state of the packets of information sent
A client firewall can also warn the user each time a program attempts to make a connection, and ask whether the connection should be allowed or blocked. It can gradually learn from the user’s responses, so that it knows which types of traffic the user allows.