In computing, a firewall is a network security device, either hardware or software, that monitors and controls traffic based on predefined rules. It creates a protective barrier between a trusted internal network and untrusted external networks like the Internet, preventing unauthorized access and threats.
Firewalls can be software running on general-purpose hardware or standalone hardware appliances with additional features like VPN support and intrusion detection. Most personal computers include built-in software firewalls, and many routers have integrated firewall components. Some advanced firewalls also perform basic routing functions.