In computing, a firewall is software or firmware that enforces a set of rules about what data packets will be allowed to enter or leave a network.