A firewall is a network security system, either hardware or software-based, that uses rules to control incoming and outgoing network traffic.

A firewall acts as a barrier between a trusted network and an untrusted network. A firewall controls access to the resources of a network through a positive control model. This means that the only traffic allowed onto the network is defined in the firewall policy; all other traffic is denied.