Back to Blog
We use this to reply to you. Privacy policy
DDoSDDoS TestingSYN FloodTCPLayer 4

SYN Flood Testing: Every Table the Handshake Touches

BlackNeuron Research Team
November 29, 2026
12 min read
SYN Flood Testing: Every Table the Handshake Touches

A SYN flood is aimed at one queue and lands on every table in front of it.

The SYN flood is the oldest denial-of-service attack still in routine use, and its fix is nearly as old. SYN cookies took the listener's half-open queue out of the attack in 1996, and Linux distributions ship with them switched on.

That is why SYN flood testing so often ends in a pass that means less than it appears to. The run confirms the listener survives. It rarely asks which box actually answered the SYN, or how many stateful devices wrote the attempt down on the way there.

SYN flood testing, defined

SYN flood testing is controlled, authorised traffic that opens TCP handshakes and never completes them, sent through the real path to a service, to find the SYN rate at which each component in that path stops accepting new connections and which component gets there first.

The listening socket is one of those components. On most production paths it is not the first to go.

What other pages already cover

How the attack works and the queue it targets are in the SYN flood and TCP SYN backlog definitions, including the residence arithmetic and the kernel counters for the listener. The cookie trade-off is in SYN cookies, the inline alternative and its ceiling in SYN proxy, and the sysctls sit with the other transport-layer vectors in understanding DDoS attack vectors.

This post covers the path around the listener: which hop terminates the handshake, which hops track it without answering, and what a test that never forges a source address can and cannot show. Authorisation, ramps and stop conditions are the same as for any target, and the complete guide to DDoS testing has them.

At a glance: where a SYN gets held

HopWhat it does with a SYNWhat fillsWhere to read it
CDN or reverse proxy that terminates TCPAnswers it; the origin never sees itThe proxy's own queuesThe provider's or the proxy's metrics
Stateful firewall or cloud security groupRecords it and forwards itA connection-tracking tableDevice counters, cloud allowance metrics
Pass-through load balancerForwards it, sometimes with stateA flow tableThe balancer's metrics
Host kernel with netfilter trackingRecords it before the socket sees itnf_conntracknf_conntrack_count, the kernel log
Listening socketAnswers itThe half-open queue, unless cookies engagenstat, ss

Who answers the SYN, and who writes it down Two common layouts. One hop answers; every stateful hop before it keeps a row. Terminating edge Test source SYN, never ACK CDN or reverse proxy answers the SYN itself Origin listener sees only the edge's connections The origin's queue reads empty. That is the edge's result, so check the direct path to the origin separately. Pass-through path Test source SYN, never ACK Firewall or SG keeps a row Pass-through LB forwards it Host conntrack row held 60 s Listener cookie, no row Amber boxes track without answering. Green boxes answer. SYN cookies protect only the last green box. The first table to fill sets the knee for the whole path, and on most paths it is not the listener's. BlackNeuron™
SYN flood testing path map: on a terminating edge the CDN or reverse proxy answers the SYN itself and the origin listener sees only the edge's connections, so its empty queue is the edge's result; on a pass-through path the test source's SYN passes a firewall or security group that keeps a row, a pass-through load balancer that forwards it and host conntrack that holds a row for 60 seconds, and only the listener answers, with a SYN cookie and no row

The hop that answers

A TCP handshake has exactly one counterpart. Whichever device sends the SYN-ACK is the one whose half-open queue the flood fills, and on many architectures that device is not your server.

A terminating edge moves the target

A CDN, a reverse proxy or an L7 load balancer completes the client's handshake itself and opens separate connections to the origin. The attacker's SYNs end at the edge.

The origin's queue then reads empty for the whole test. That is a correct result and says nothing about the origin. It is a measurement of the edge, whose ceiling belongs to the provider and is documented in their terms or not at all.

The origin-side question at a terminating edge is a different one: does a path to the origin exist for anyone who skips the edge? If the origin answers SYNs from the whole internet, the edge is a detour, which is the subject of origin IP exposure and CDN bypass.

A pass-through balancer hands the SYN on

A network load balancer that forwards packets without terminating them, or a Kubernetes Service implemented with address translation, delivers the attacker's SYN to a backend kernel. Now the backends answer, and their queues and cookies are the control under test.

This is the layout in which the listener result matters most. It is also the layout in which the forwarded SYN passes through the most state on its way, which is the next section.

Every listener is its own queue

The half-open queue belongs to a listening socket, not to the host. A run against port 443 says nothing about the SSH port, an admin console on 8443 or the port the health check uses, and each one was sized by whichever program called listen().

Application defaults are where this bites. nginx passes a backlog of 511 on Linux unless the listen directive says otherwise, as the NGINX and load balancer post notes, so two services on the same host can sit eight times apart.

Cookies empty one table, not the ones in front

SYN cookies stop the listener from holding state for a half-open connection. They do nothing for state held by anything else, and on a modern host something else is often tracking.

The host's own conntrack

With netfilter connection tracking loaded, every inbound SYN creates a tracking entry before the socket sees the packet. That covers any host with stateful iptables or nftables rules, most container hosts that publish ports, and Kubernetes nodes where kube-proxy relies on conntrack to translate Service addresses.

When the kernel answers with a cookie, the entry moves to SYN_RECV, and on a default kernel nf_conntrack_tcp_timeout_syn_recv keeps it for 60 seconds. The socket holds nothing. The tracking table holds one row per SYN for a minute.

So a host can log "Sending cookies", keep its listener perfectly healthy, and still drop every new flow on the box through conntrack exhaustion, SSH and the monitoring agent included. The cookie worked. The host went dark anyway.

Cookies empty one table, not the one in front One Linux host under a SYN flood, cookies on, netfilter connection tracking loaded. ONE HOST SYN flood about 4,400 SYN/s no ACK ever returns nf_conntrack 262,144 of 262,144 rows one SYN_RECV row per SYN, held 60 s kernel log: table full, dropping packet every new flow on the host is refused Listening socket, port 443 half-open queue: 0 rows a cookie answers every SYN kernel log: Sending cookies the listener check passes The listener reports healthy. New flows to every port, SSH and monitoring included, are dropped first. Model numbers: an 8-core Kubernetes node with kube-proxy's default sizing and the kernel's default timeouts. BlackNeuron™
SYN cookies protect one table: one Linux host with cookies on and netfilter tracking loaded takes a SYN flood of about 4,400 SYNs per second with no ACK returning; the nf_conntrack table is full at 262,144 of 262,144 rows, one SYN_RECV row per SYN held 60 seconds, and logs table full, dropping packet, refusing every new flow on the host, while the listening socket on port 443 holds zero half-open rows, answers every SYN with a cookie and passes its check

The sizes are not chosen for floods

kube-proxy sizes the node's table at 32,768 entries per CPU core by default, with a floor of 131,072. An 8-core node gets 262,144 rows. At 60 seconds per half-open row, about 4,400 SYNs a second keeps it full.

That is a small number. At 60 bytes a packet it is roughly two megabits a second, well under anything a bandwidth alarm would notice.

Stateful hops upstream

The same holds one hop out. A stateful firewall in front of the servers records each SYN it forwards, and it usually carries a smaller table than the servers behind it, the appliance pattern the on-premise post describes.

Cloud security groups are stateful in the same way. On AWS, an instance's tracked connections count against a per-instance allowance, and the ENA driver reports conntrack_allowance_exceeded when packets are dropped because it ran out. AWS also documents the narrow conditions under which a flow is not tracked at all, rules open to every address and port in both directions among them, which shows how few SYNs escape tracking by default.

Where a SYN proxy helps

A SYN proxy answers before anything behind it records state. Linux has one built in: netfilter's SYNPROXY target, deployed with the SYN exempted from tracking in the raw table, so a SYN that is never completed creates no conntrack entry at all. Only a client that finishes the handshake earns a row.

The definition covers the proxy's own ceiling. The test question here is placement: a proxy protects the tables behind it and none of the tables in front of it.

What an unspoofed test can and cannot show

A real SYN flood usually carries forged sources. A legitimate test sends none, and its SYNs leave from machines the tester runs. That changes three readings in a SYN flood test, and the report should say how each was handled. The wider list of what a simulation leaves out by design is in DDoS simulation.

The generator can clean up its own flood

When the server's SYN-ACK reaches a real test host that never opened the connection, that host's TCP stack answers with a reset. The reset frees the half-open entry at once.

Residence time is half the arithmetic of a full queue. An entry the kernel would hold for about 63 seconds under default retries is held for one round trip instead, so at 20 milliseconds the same SYN rate keeps roughly 3,000 times fewer entries occupied.

A test that misses this reports a knee far above the real one. The test hosts must stay silent on the return path, and the report should state that they did.

Who answers the SYN-ACK sets how long a slot is held The same SYN from three senders. Linux defaults: five SYN-ACK retries, about 63 seconds. Forged source, an attack the SYN-ACK goes nowhere slot held about 63 s, through five retries Test host that answers its kernel sends a reset slot freed after one round trip, about 20 ms Test host kept silent SYN-ACK recorded, no reset slot held about 63 s, the same as the attack 0 s 63 s The middle lane reports a knee about 3,000 times too high. The report should say which lane its generator was in. BlackNeuron™
Who answers the SYN-ACK sets how long a half-open slot is held: for a forged source in an attack the SYN-ACK goes nowhere and the slot is held about 63 seconds through five retries; for a test host whose kernel sends a reset the slot is freed after one round trip of about 20 milliseconds; for a test host kept silent, recording the SYN-ACK without a reset, the slot is held about 63 seconds, the same as the attack, so the middle lane reports a knee about 3,000 times too high

Per-source limits read better than they are

A test from a few hundred real addresses sends many SYNs from each. A per-source SYN rate limit sees all of them, trips early, and the run shows a control that held.

A forged flood at the same total rate sends a handful of SYNs from each of millions of addresses, and the same limit never fires. So a per-source control is judged by arithmetic, the total rate divided by a realistic source count against the per-source threshold, and recorded in the report as not measured by the run.

The SYN-ACKs come home

One reading is better in a test than in an attack. Every SYN-ACK and every retransmission returns to the tester's own addresses, so the server's retry behaviour is visible directly: how many SYN-ACKs each SYN earned, when cookies started, and whether the retry count matches the configuration.

Reading the result hop by hop

The deliverable of a SYN flood test is a short table: each stateful hop in the path, the SYN rate at which it started dropping, and the counter that showed it. The lowest row is the layer of first failure.

Predict it before the first run

Every row follows the same arithmetic: a table fills at its size divided by how long it holds a half-open entry. Write down each hop's size and hold time, and the predicted knee falls out before a packet is sent.

2026-11-29T07:06:11.183502 image/svg+xml Matplotlib v3.5.1, https://matplotlib.org/ 0 1000 2000 3000 4000 5000 SYNs per second needed to fill the table 1,024-entry SYN queue, default retries, 63 s 4,096-entry SYN queue, default retries, 63 s 4,096-entry SYN queue, 2 retries, 7 s 262,144-row conntrack table, SYN_RECV 60 s 16 SYN/s 65 SYN/s 585 SYN/s 4369 SYN/s Model, not a measurement. Fill rate = table size divided by how long a half-open entry is held. Source: arithmetic on Linux defaults: tcp_synack_retries 5, nf_conntrack_tcp_timeout_syn_recv 60 s, kube-proxy 32,768 conntrack rows per core on 8 cores SYN rate that fills each table BlackNeuron™
Bar chart, a model rather than a measurement: SYNs per second needed to fill each table, 16 for a 1,024-entry SYN queue with default retries holding entries 63 seconds, 65 for a 4,096-entry SYN queue with default retries, 585 for a 4,096-entry SYN queue with two retries holding entries 7 seconds, and 4,369 for a 262,144-row conntrack table holding SYN_RECV rows 60 seconds; with cookies on, the listener's queue never refuses, so the conntrack row is the one left to fill

With cookies off, the listener's queue is the lowest bar by a wide margin. With cookies on, it drops out of the chart, and the knee for the whole host becomes the tracking table. The test confirms which prediction is true, and a hop that fails well below its predicted rate is the finding.

The counters per hop

  • Listener: ListenOverflows, ListenDrops and the Syncookies counters from nstat, plus the "Possible SYN flooding" line in the kernel log.
  • Host tracking: nf_conntrack_count against nf_conntrack_max, the drop and insert_failed columns of conntrack -S, and "table full, dropping packet" in the log.
  • Cloud instance: the provider's tracked-connection metric, for AWS conntrack_allowance_exceeded from ethtool -S.
  • Firewall or balancer: session table use and new-session rate, from the device itself.
  • Terminating edge: the provider's reporting, alongside the origin's view of the connections the edge opens to it.

The number a user feels

All of those counters stand in for one figure: the share of real clients that complete a handshake during the flood, and how long it takes them. Run a known-good client population through the same path for the whole test and record handshake success and connect time.

A client whose SYN was dropped retransmits it, so connect times bunch near one, three and seven seconds on Linux clients. Those clusters in the results are the dropped SYNs, counted from the client's side.

Health checks use the same handshake

A load balancer's health check is a TCP connection like any other. If a backend's queue fills with cookies off, or its host's tracking table fills with cookies on, the health check's SYN is dropped with everyone else's and the backend is marked down.

Its traffic moves to the others, which may already be flooded. A SYN flood can empty a pool this way without the balancer itself being under any strain, so the test watches the balancer's healthy-host count alongside the backends' counters.

Running the test

Ramp SYN rate, not bandwidth

At 60 bytes a packet, 100,000 SYNs a second is under 50 megabits. Specify the ramp in packets per second and let bandwidth fall out of it; a plan written in Gbps for this vector has picked the wrong unit.

One run per listener that matters

Each listening socket has its own queue, so each one the business depends on gets its own run: the public ports, the health-check port, and the management ports reachable from wherever the flood would come from.

Cookies on is the result

Cookies on is the production state and the one the report leads with. A second run with cookies off, in staging, shows how much margin the queue alone provides, and how the cookie trade-off described in the definition affects users who connect mid-flood.

The neighbouring shapes

Plain SYNs are not the only handshake flood. SYN floods carrying payload add bandwidth to the state cost, and SYN-ACK floods test how each stateful hop treats handshake packets that belong to no connection. Each gets its own short run, with the rate caps and stop conditions in DDoS testing without disrupting production.

FAQ

What is SYN flood testing?

It is authorised traffic that opens TCP handshakes without completing them, sent through the real path to a service, to measure the SYN rate at which each stateful component stops accepting new connections. The result names the component that fails first, which is often a connection-tracking table rather than the listening socket.

Do you need spoofed traffic to test SYN flood protection?

No, and a legitimate test never uses it. SYN cookies and SYN proxies behave the same for any source that does not complete the handshake, so a test from the tester's own addresses exercises them fully, provided the test hosts do not reset the server's SYN-ACKs. Per-source limits are the one control a real-source test cannot judge against forged addresses, so they are assessed by arithmetic instead.

Are SYN cookies enough to stop a SYN flood?

They protect the listening socket. They do nothing for a connection-tracking table on the same host or on any stateful device in front of it, and those tables often fill first. A host can answer every SYN with a cookie and still drop every new flow.

Does a CDN protect the origin from SYN floods?

For traffic that goes through it, yes: the CDN terminates the handshake and the origin never sees the attacker's SYNs. It does nothing for SYNs sent straight to the origin's own address, which is why origin reachability belongs in the test.

How many SYNs per second does it take to cause an outage?

It depends on the smallest table in the path and how long it holds a half-open entry. A 4,096-entry queue with default retries fills at about 65 SYNs a second if cookies are off. A 262,144-row tracking table holding entries for 60 seconds fills at about 4,400. Both are tiny next to the bandwidth of a single server port.

Bookkeeping, not bandwidth

A SYN flood is an attack on bookkeeping. It costs the attacker almost nothing to send and costs every device that writes the attempt down a row for as long as that device is willing to wait.

The listener's part of that was solved in 1996. The tables in front of it have been added one at a time since: a stateful rule here, a container runtime there, a security group, a Service proxy, each sized for normal traffic by someone who was not thinking about half-open connections.

The fix for the queue shipped decades ago. A SYN flood test is for everything installed in front of it since.

We use this to reply to you. Privacy policy