Classification of Firewall
On the basis of function. firewall divided into 5 categories that are
There are five types of firewalls that have played important roles as the firewall class has grown:
Packet filtering firewalls
This is the original kind of firewall, functions at connection points where devices such as routers and switches do their work. this type of function is found in maximum firewall
This firewall work on a set of recognized principles such as the permissible IP addresses, packet type, port number, etc. Packets that are labeled as troublesome are, generally speaking, unceremoniously dropped — that is, they are not forwarded and, thus, cease to exist.
This is work on the root of the TCP/IP module as they are recognized first logical linking between the local and isolated hosts. If once the host computer considered the remote system reliable then it doesn’t examine the packets directly transfer the packets
Stateful inspection firewalls
State-aware devices, on the other hand, not only inspect individually packet but also keep the path of whether or not that packet is part of a recognized TCP session. This type of firewall offers more security than both packet filtering & circuit monitoring alone.
This type of device, technically a proxy, and it is also called as a proxy firewall, combines some of the qualities of packet filtering firewalls with those of circuit-level gateways. They filter packets not only according to the service for which they are projected as definite by the target port but also by certain other characteristics, such as the HTTP request string.
While gateways that filter at the application layer provide considerable data security, they can dramatically disturb network performance.
This is a new generation of firewall technology. It is the third innovation of firewall technology. A high-end, next-gen firewall offer cutting-edge features, such as recognizing the applications producing all the traffic passing through and mixing with other major network components, like Active Directory.
Whichever of the types of firewalls you select, keep in mind that a misconfigured firewall can, in some ways, be worse than no firewall at all because it gives the risky impression of security, while as long as little or none.
NGFWs include the distinctive functions of traditional firewalls such as packet filtering,  network- and port address translation (NAT), stateful inspection, and virtual private network (VPN) support. The aim of next-generation firewalls is to add more layers of the OSI model, to improve the filtering of network traffic that is dependent on the packet contents.
To know more about the function of firewall watch this video