A firewall acts as a barrier between a trusted network and untrusted networks. When it is configured to block unauthorized access, it is considered a preventive control because it prevents security incidents from occurring by strictly allowing only authorized traffic.