A network firewall is a type of Gateway device that focuses on monitoring π and filtering traffic β.
They operate at both layer 3 (IP) and layer 4 (protocol, port).
There are many others kinds of firewalls, either software- or hardware-based. See the Firewalls section.