A firewall is a network security device that grants or rejects network access to traffic flows between a trusted zone and an untrusted zone.