What is the purpose of a firewall in network security?
Correct: B
A firewall acts as a barrier between a trusted network and an untrusted network (e.g., the internet). Its primary purpose is to control network traffic based on pre-defined security rules, blocking unauthorized access and preventing malicious attacks. While encryption can be used in conjunction with a firewall, encryption is a separate task.