DoS Protection Profiles and Policy Rules
DoS Protection profiles and DoS Protection policy rules combine to protect specific groups of critical resources and individual critical resources against session floods. Compared to Zone Protection profiles, which protect entire zones from flood attacks, DoS protection provides granular defense for specific systems, especially critical systems that users access from the internet and are often attack targets, such as web servers and database servers.
Apply both Zone Protection and DoS Protection. If you only apply a Zone Protection profile, a DoS attack targeting a particular system in the zone can succeed if the total connections-per-second (CPS) doesn’t exceed the zone’s Activate and Maximum rates.
DoS Protection is resource-intensive, so use it only for critical systems.
Similar to Zone Protection profiles, DoS Protection profiles specify flood thresholds. DoS Protection policy rules determine the devices, users, zones, and services to which DoS Profiles apply.
In addition to configuring DoS protection and zone protection, apply the best practice Vulnerability Protection profile to each Security policy rule to help defend against DoS attacks.
Classified Versus Aggregate DoS Protection
You can configure aggregate and classified DoS Protection Profiles, and apply one profile or one of each type of profile to DoS Protection Policy Rules when you configure DoS Protection.
- Aggregate: Sets thresholds that apply to the entire group of devices specified in a DoS Protection policy rule. One device could receive the majority of the allowed connection traffic. For example, a Max Rate of 20,000 CPS means the total CPS for the group is 20,000. Aggregate policies provide another layer of broad protection (after dedicated DDoS devices and Zone Protection profiles) for a group of critical devices, applying extra constraints on specific subnets, users, or services.
- Classified: Sets flood thresholds that apply to each individual device specified in a DoS Protection policy rule. For example, if you set a Max Rate of 5,000 CPS, each device specified can accept up to 5,000 CPS. Devices governed by the same classified rule should be similar in capacity. Classified profiles protect individual critical resources.
When you configure a DoS Protection policy rule with a classified DoS Protection profile (
Option/Protection -> Classified -> Address
), use the
Address
field to specify whether incoming connections count toward the profile thresholds based on matching the:
- source-ip-only
- destination-ip-only
- scr-dest-ip-both (counts the source-destination pair match)
Counters consume resources, so the counting method affects firewall resource consumption. Use classified DoS protection to:
- Protect critical individual devices (web servers, database servers, DNS servers). Create a DoS Protection policy rule applying the profile to each server’s IP address (destination criteria), and set the Address to destination-ip-only .
- Monitor the CPS rate for a suspect host or group of hosts ( zone cannot be internet-facing ). Set an appropriate alarm threshold in a classified profile. Create a DoS rule applying the profile to the source IP/group and set Address to source-ip-only .
Do not use source-IP-only or src-dest-ip-both classification for internet-facing zones in classified DoS Protection policy rules. The firewall lacks the capacity to store counters for every possible IP address on the internet. Increment the threshold counter for source IPs only for internal zone or same-zone rules. In perimeter zones, use destination-ip-only .
The firewall uses more resources to track src-dest-ip-both than source-IP-only or destination-ip-only because it tracks unique pairs.
If you apply both an aggregate and a classified DoS Protection profile to the same DoS Protection policy rule, the firewall applies the aggregate profile first . If the aggregate threshold is hit, its action is taken. If the aggregate threshold is not hit, the classified profile is checked. If its threshold is hit, its action is taken against the specific matching IP(s). Both might trigger blocking if aggregate is hit first and classified later for a specific IP within the (now reduced) group traffic.
If you want both an aggregate and a classified DoS Protection profile to apply to the same traffic, you must apply both profiles to the same DoS Protection policy rule . Applying them to different rules (even with identical criteria) means only the first matching rule's profile will be applied, similar to Security policy rule processing.
DoS Protection Profiles
DoS Protection profiles set thresholds that protect against new session IP flood attacks (SYN, UDP, ICMP, ICMPv6, Other IP) and provide resource protection (maximum concurrent session limits). They protect specific devices (classified) or groups (aggregate). Configuring flood protection is similar to Zone Protection profiles, but DoS protection is more granular.
Measure and monitor firewall dataplane CPU consumption to ensure proper sizing for DoS/Zone Protection and other features like decryption. Use Panorama's Device Monitoring ( Panorama > Managed Devices > Health > All Devices ) to check CPU/memory usage and trends.
For each flood type, you set three thresholds and a block duration:
- Alarm Rate: Generates a DoS alarm when CPS exceeds this. Set ~15-20% above average CPS.
- Activate Rate: Firewall starts dropping new connections (using RED or SYN Cookies for SYN floods) when CPS exceeds this, until the rate drops below. Can be set equal to Max Rate to only block when the absolute max is hit, or lower to start mitigation earlier.
- Max Rate: Firewall blocks (drops) all new connections from the offending IP for the Block Duration when CPS exceeds this. Base this on the capacity of the protected resource(s). For aggregate, maybe 80-90% of group capacity.
- Block Duration: Time (default 300 seconds) the firewall blocks new connections from an IP after exceeding the Max Rate. During the block, incoming connections from that source are not counted towards thresholds.
For SYN Flood Protection, you set the drop Action :
- SYN Cookies: Firewall acts as a proxy, handling the 3-way handshake. Treats legitimate traffic fairly, only dropping failed handshakes. More resource-intensive. Recommended unless resources are constrained or you lack a dedicated upstream DDoS device.
- Random Early Drop (RED): Drops traffic randomly when the Activate rate is hit. Less resource-intensive but may impact legitimate traffic. Use if SYN Cookies consume too many resources or if the firewall is the primary DDoS mitigator.
Default threshold values are high. Monitor traffic and adjust thresholds based on baseline measurements of average and peak CPS for critical devices. Avoid overly aggressive settings.
Firewalls with multiple dataplane processors (DPs) distribute connections and generally divide CPS thresholds equally across DPs. A 20,000 CPS threshold on a 5-DP firewall means each DP triggers at 4,000 CPS.
Resource Protection
DoS Protection profiles also prevent session exhaustion attacks via the Resources Protection tab. Set the maximum number of concurrent sessions allowed for the endpoints defined in the applied DoS policy rule. When the limit is reached, new sessions are dropped.
Set this threshold based on the capacity of the protected resources (e.g., ~80% capacity), then monitor and adjust.
- For aggregate profiles, the limit applies to all traffic matching the rule (source and destination combined).
- For classified profiles, the limit applies based on the classification method ( source-ip-only , destination-ip-only , or src-dest-ip-both ).
DoS Protection Policy Rules
DoS Protection policy rules control which systems receive DoS protection, the action taken, and logging. Use DoS protection only for specific critical resources due to its resource consumption. Use Zone Protection for broader zone defense.
DoS Policy rules offer granular matching criteria:
- Source zone, interface, IP address (including regions), user.
- Destination zone, interface, IP address (including regions).
- Services (by port and protocol). Protection applies only to specified services, but does *not* implicitly block other services matching source/destination.
Consider protecting unused service ports on critical servers too. Create separate DoS rules/profiles for used vs. unused ports, applying much stricter thresholds to unused ports. Be mindful of firewall capacity.
When traffic matches a DoS Protection policy rule, the firewall takes one of three Actions :
- Deny: Blocks matching traffic. No DoS profile is applied.
- Allow: Permits matching traffic. No DoS profile is applied.
- Protect: Applies the specified DoS Protection profile(s) (one aggregate and/or one classified) to matching traffic. This is the most common action for applying DoS thresholds.
The firewall only applies DoS profiles if the Action is Protect . Allow/Deny actions create exceptions without applying DoS protection.
You can Schedule when a DoS rule is active, allowing different thresholds for different times (e.g., day vs. night) or special events.
Configure Log Forwarding to separate DoS logs. Forward threshold violations directly to admins via email and also to log servers (SNMP/syslog). Threshold breaches should be infrequent on properly sized firewalls and indicate potential attacks.
Diagrams
Aggregate vs. Classified Profile Application Flow
Illustrates the decision logic when a DoS Policy Rule with Protect action has Aggregate and/or Classified profiles applied.
SYN Flood Protection with SYN Cookies
Sequence diagram showing how the firewall uses SYN Cookies to validate clients during a SYN flood before establishing a connection to the actual server.
DoS Protection Quiz
Test your understanding of DoS Protection Profiles and Policy Rules. Select the best answer for each question.