B. To filter and control network traffic based on predetermined security rules
A firewall is a network security device that monitors and filters incoming and outgoing network traffic based on an organization's previously established security policies.