The levels of protection firewalls provide and the way they offer that protection vary widely. A packet-filtering firewall is a router or computer running software that has been configured to screen incoming and outgoing packets. A packet-filtering firewall accepts or denies packets based on information contained in the packets' TCP and IP headers. TCP handshaking between packets from trusted clients or servers to untrusted hosts and vice versa to determine whether a requested session is legitimate. Proxies are often used instead of router-based traffic controls, to prevent traffic from passing directly between networks.
Many proxies contain extra logging or support for user authentication.
Like a packet-filtering firewall, a stateful inspection firewall operates at the network layer of the OSI model, filtering all incoming and outgoing packets based on source and destination IP addresses and port numbers. A stateful inspection firewall also functions as a circuit-level gateway, determining whether the packets in a session are appropriate. For example, a stateful inspection firewall verifies that SYN and ACK flags and sequence numbers are logical. Computer Virus Screening Server-based virus scanning can be done in conjunction with a firewall by redirecting particular network traffic to such services before allowing the specified traffic through to the network. The anti-virus application would then take over, scanning the email attachment for viruses and curing any that were found before returning the communication to the firewall server where it would then be allowed to proceed to its destination.