Firewall is a network device which is used to manage and protect traffic between networks with different levels of reliability and security. Typically, this is the internet and intranet. In simply way it is control point, which defines the rules for communication between networks, which separates. Firewall can be supplied as a hardware component or as software.
These rules was historically always included the identification of the source and destination IP addresses and source and destination port, but this is for today's firewalls totally insufficient. Modern firewalls checked at least link state information, knowledge of the protocols and features of IDS and IPS.
The latest types of firewalls called Next Generation Firewalls (NGFW), completely changed the view of network traffic. Threats are now significantly changed ,firewalls need to change the control over network traffic and was necessary to add again visibility to network.