Firewalls control network traffic flow between networks and can operate at different layers. There are four main types of firewalls - packet filters at the network layer, circuit-level gateways at the session layer, application-level proxies that are application-specific, and stateful multilayer firewalls that combine aspects of the other three. Firewalls will continue advancing as attacks become more sophisticated, and may integrate virus scanning in the future.