In this example, you protect four Web servers in the DMZ zone from SYN flood attacks originating in the external zone by enabling the SYN flood protection SCREEN option for the external zone.
|
Before You Begin |
|---|
|
For background information, read Understanding SYN Flood Attacks. |
![]() |
Note: We recommend that you augment the SYN flood protection that JUNOS software with enhanced services provides with device-level SYN flood protection on each of the Web servers. In this example, the Web servers are running UNIX, which also provides some SYN flood defenses, such as adjusting the length of the connection request queue and changing the timeout period for incomplete connection requests. |
Figure 48: Device-Level SYN Flood Protection

To configure the SYN flood protection parameters with appropriate values for your network, you must first establish a baseline of typical traffic flows. For one week, you run a sniffer on ethernet3—the interface bound to zone_external—to monitor the number of new TCP connection requests arriving every second for the four Web servers in the DMZ zone. Your analysis of the data accumulated from one week of monitoring produces the following statistics:
![]() |
Note: A sniffer is a network-analyzing device that captures packets on the network segment to which you attach it. Most sniffers allow you to define filters to collect only the type of traffic that interests you. Later, you can view and evaluate the accumulated information. In this example, you want the sniffer to collect all TCP packets with the SYN flag set arriving at ethernet3 and destined for one of the four Web servers in the DMZ.You might want to continue running the sniffer at regular intervals to see if there are traffic patterns based on the time of day, days of the week, the time of month, or the season of the year. For example, in some organizations, traffic might increase dramatically during a critical event. Significant changes probably warrant adjusting the various thresholds. |
Based on this information, you set the following SYN flood protection parameters for zone_external, as shown in Table 43.
Table 43: SYN Flood Protection Parameters
To configure SYN flood protection parameters:
- user@host# set interfaces ge-0/0/0 unit 0 family inet
address 1.2.2.1/24
- user@host# set interfaces fe-1/0/0 unit 0 family inet
address 1.1.1.1/24
- user@host# set security zones security-zone zone_dmz
interfaces ge-0/0/0.0
- user@host# set security zones security-zone zone_external
interfaces fe-1/0/0.0
- user@host# set security zones security-zone zone_dmz
address-book address ws1 1.2.2.10/32
- user@host# set security zones security-zone zone_dmz
address-book address ws2 1.2.2.20/32
- user@host# set security zones security-zone zone_dmz
address-book address ws3 1.2.2.30/32
- user@host# set security zones security-zone zone_dmz
address-book address ws4 1.2.2.40/32
- user@host# set security zones security-zone zone_dmz
address-book address-set web_servers address ws1
- user@host# set security zones security-zone zone_dmz
address-book address-set web_servers address ws2
- user@host# set security zones security-zone zone_dmz
address-book address-set web_servers address ws3
- user@host# set security zones security-zone zone_dmz
address-book address-set web_servers address ws4
- user@host# set security policies from-zone zone_external
to-zone zone_dmz policy id_1 match source-address any
- user@host# set security policies from-zone zone_external
to-zone zone_dmz policy id_1 match destination-address web_servers
- user@host# set security policies from-zone zone_external
to-zone zone_dmz policy id_1 match application junos-http
- user@host# set security policies from-zone zone_external
to-zone zone_dmz policy id_1 then permit
- user@host# set security screen zone_external-syn-flood
tcp syn-flood alarm-threshold 250
- user@host# set security screen zone_external-syn-flood
tcp syn-flood attack-threshold 625
- user@host# set security screen zone_external-syn-flood
tcp syn-flood source-threshold 25
- user@host# set security screen zone_external-syn-flood
tcp syn-flood timeout 20></statement>
- user@host# set security zones security-zone zone_external
screen zone_external-syn-flood