A firewall is used to control passing of information from one network to another by controlling the ports. It also controls outgoing and incoming packets. Each packet is checked before it is allowed to pass through the firewall. The packet is allowed inside the firewall or it is allowed to go outside of the firewall only when the rules in the firewall are met. A firewall can be a hardware or a software component.
Types of firewalls:
1) Hardware firewall: In a hardware firewall, a hardware device acts as a firewall which checks the packets which are allowed to come inside or to go outside the network. It is generally used by companies and organizations.
2) Software firewall: In a software firewall, a software installed in the computer (usually an antivirus or an internet security software) acts as a firewall which checks the packets which are allowed to come inside or to go outside the network. It is generally used in personal computers.
3) Network layer or Packet filter firewall: A network layer or packet filter firewall operates in the bottom most network access layer of the TCP/IP protocol layer. It can be further classified in to stateless firewall and stateful firewall
a) Stateless firewall: In this type of firewall, header of each packet is checked. If it meets the conditions of the firewall it is allowed in or out. (whichever the situation may be). It is not a very secure type of firewall as it only checks the individual packets. It doesn’t checks from which connection the packet is coming. And also, it will not check the state of the connection.
b) Stateful firewall: In this type of firewall, along with the packets, it is also checked from which connection the packets are coming and the state of the connection. Because of this stateful firewall is more secure than a stateless firewall.
4) Application layer firewall: An application layer firewall operates in the top most application layer of the TCP/IP protocol layer. They control outgoing and incoming packets from applications and every process is analyzed.
5) Proxy firewall: In a proxy firewall, a proxy server is used for controlling the flow of packets. It operates in the application layer.