A network security device or software that monitors and controls incoming and outgoing network traffic based on predetermined security rules. Firewalls are used to block unauthorized access to private networks while permitting legitimate communication.