Firewalls monitor incoming and outgoing network traffic and allow only authorized traffic according to a security policy. There are different types of firewalls including packet filters, application-level gateways, and circuit-level gateways. Packet filters apply rules to IP packets to forward or discard them, while application-level gateways provide end-to-end connections and additional security through proxy services. Circuit-level gateways limit connections between internal and external hosts. Firewall configurations can include screened host or screened subnet designs with dual-homed bastion hosts for added security.