Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Stateful Firewall Overview for Next Gen Services

Services PICs employ a type of firewall called a stateful firewall. Contrasted with a stateless firewall, which inspects packets in isolation, a stateful firewall provides an extra layer of security by using state information derived from past communications and other applications to make dynamic control decisions for new communication attempts.

Stateful firewalls group relevant flows into conversations, and decide whether the conversation is allowed to be established. If a conversation is allowed, all flows within the conversation are permitted, including flows that are created during the life cycle of the conversation.

Benefits

By Inspecting the application protocol data of a flow, the stateful firewall intelligently enforces security policies and permits only the minimally required packet traffic.

Flows and Conversations

A typical Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) conversation consists of two flows: the initiation flow and the responder flow. However, some conversations, such as an FTP conversation, might consist of two control flows and many data flows.

A flow is identified by the following five properties:

  • Source address

  • Source port

  • Destination address

  • Destination port

  • Protocol

Stateful Firewall Rules

Stateful firewall rules govern whether the conversation is allowed to be established. A rule consists of matching conditions and actions to take.

Matching conditions include direction, source address, destination address, and application protocol or service. In addition to the specific values you configure, you can assign the value any, any-ipv4, any-ipv6, or you can use an address-book under services to define address lists and ranges for use within stateful firewall rules. Finally, you can specify matches that result in the rule not being applied.

Actions in a stateful firewall rule include allowing the traffic or dropping the traffic.

Stateful firewall rules are directional. For each new conversation, the router software determines whether the initiation flow direction matches the rule direction.

Stateful firewall rules are ordered. The software checks the rules in the order in which you include them in the configuration. The first time the software finds a matching rule for a flow, the router implements the action specified by that rule, and ignores subsequent rules.

The stateful firewall rules are configured in relation to an interface. By default, the stateful firewall allows all sessions initiated from the hosts behind the interface to pass through the router.

Stateful Firewall Anomaly Checking

The stateful firewall recognizes the following events as anomalies and sends them to the IDS software for processing:

  • IP anomalies:

    • IP version is not correct.

    • IP header length field is too small.

    • IP header length is set larger than the entire packet.

    • Bad header checksum.

    • IP total length field is shorter than header length.

    • Packet has incorrect IP options.

    • Internet Control Message Protocol (ICMP) packet length error.

    • Time-to-live (TTL) equals 0.

  • IP address anomalies:

    • IP packet source is broadcast or multicast.

    • Land attack (source IP equals destination IP).

  • IP fragmentation anomalies:

    • IP fragment overlap.

    • IP fragment missed.

    • IP fragment length error.

    • IP packet length is more than 64 kilobytes (KB).

    • Tiny fragment attack.

  • TCP anomalies:

    • TCP port 0.

    • TCP sequence number 0 and flags 0.

    • TCP sequence number 0 and FIN/PSH/RST flags set.

    • TCP flags with wrong combination (TCP FIN/RST or SYN/(URG|FIN|RST).

    • Bad TCP checksum.

  • UDP anomalies:

    • UDP source or destination port 0.

    • UDP header length check failed.

    • Bad UDP checksum.

  • Anomalies found through stateful TCP or UDP checks:

    • SYN followed by SYN-ACK packets without ACK from initiator.

    • SYN followed by RST packets.

    • SYN without SYN-ACK.

    • Non-SYN first flow packet.

    • ICMP unreachable errors for SYN packets.

    • ICMP unreachable errors for UDP packets.

  • Packets dropped by stateful firewall rules.