A firewall is a network security system that monitors and controls incoming and outgoing network traffic.