Use this when TCP SYN floods fill connection tables.
SYN Flood
1. SYN flood fills half-open connection queues.
2. SYN cookies on servers.
3. Firewall/load balancer SYN protection.
4. Upstream filtering.
5. Monitor SYN-RECV.
SYN flood → backlog → SYN cookies keep service up
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ss -sVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Detection Verify boundary
ss -s
ss -tan state syn-recv | wc -l
netstat -s | grep -i "SYNs to LISTEN"
On firewalls, embryonic connection counters and SYN flood protection thresholds show attacks; many SYN_RECV entries from many sources with no completed handshakes is the classic sign.
Step 2 Common mistakes Narrow the fault
- No SYN cookies or upstream DDoS protection.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- SYN cookies avoid storing half-open connections.
- Firewalls can proxy SYNs.
- Large floods need upstream help.
netstat -s | grep -i -e 'SYNs to LISTEN' -e overflow— SYN queue dropssysctl net.ipv4.tcp_syncookies— SYN cookiesss -s— SYN-RECV counts
ReferenceWhy it matters1 section · depth on demand
Defences
- SYN cookies (Linux
net.ipv4.tcp_syncookies = 1, on by default). - Firewall or load balancer SYN proxy / TCP intercept.
- Larger backlog and shorter SYN-RECEIVED timeouts.
Check with ss -n state syn-recv | wc -l on Linux; thousands of half-open connections indicate a flood.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
A SYN flood sends large numbers of TCP SYN packets (often with spoofed sources) to fill the target's half-open connection table, so legitimate connections cannot be established.
Mitigations:
| Control | How it helps |
|---|---|
| SYN cookies | Server encodes state in the SYN-ACK; no table entry until the handshake completes |
| Firewall/load-balancer SYN proxy | Device completes handshake before passing to server |
| Rate limiting per source | Reduces single-source floods |
| Upstream scrubbing | Handles large distributed floods |
| Anti-spoofing (BCP 38) | Reduces spoofed traffic globally |
sysctl net.ipv4.tcp_syncookies # 1 = enabled (default on modern Linux)
ss -s | grep -i synrecv
SYN cookies
With SYN cookies the server does not store state for half-open connections; it encodes the state in the initial sequence number and only creates state when a valid ACK returns. Linux: sysctl net.ipv4.tcp_syncookies=1 (default). Check for floods with netstat -an | grep -c SYN_RECV or ss -s.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Common Attacks → SYN Flood. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://attack.mitre.org/techniques/enterprise/ · confidence 94%