Firewall is a device that either allows or block traffic as per defined some set of rules. And these device are placed on the boundary of any trusted or untrusted networks.