"DDoS" is a single word for very different attacks. A UDP flood tries to drown your connection in raw volume. A SYN flood exhausts the server's ability to open new connections. An HTTP flood looks like an army of ordinary visitors who all want the most expensive page on your site at once. Because each one targets a different layer, each needs a different defence. This guide explains how the three work, why blocking IP addresses rarely helps, and who is responsible for stopping what.
The three at a glance
| UDP flood | SYN flood | HTTP flood | |
|---|---|---|---|
| Layer | 3/4 (network/transport) | 4 (transport) | 7 (application) |
| Protocol | UDP | TCP | HTTP/HTTPS over TCP |
| Exploits | UDP needs no handshake | Half-open TCP connections | Expensive application work |
| Spoofed sources? | Often | Often | No — needs real connections |
| Typical volume | Very high bandwidth | High packet rate | Moderate, but costly per request |
| Typical target | Game servers, VPNs, any IP | Any TCP service | Websites, shops, APIs, logins |
| Stopped by | Network filtering upstream | Network checks + SYN cookies | Reverse proxy/WAF, rate limits, caching |
If you're new to the topic, start with what a DDoS attack is and come back here.
UDP flood: raw volume
UDP is a connectionless protocol. A sender can fire packets at any port without first agreeing on anything with the receiver — great for games, voice and DNS, where speed matters, and great for attackers.
A UDP flood comes in a few flavours:
- Volumetric — so much data that the network link in front of the server is full.
- Packet-rate — huge numbers of tiny packets that overwhelm routers and network cards even at modest bandwidth.
- Random-port — packets to closed ports, which make the server reply with ICMP "port unreachable" messages and waste resources on every one.
The biggest UDP attacks use amplification. The attacker sends small queries to open DNS, NTP, memcached or SSDP services, forging your IP as the source. Each service sends a much larger reply — to you. Thousands of innocent servers become the attacker's megaphone.
Because the source addresses are forged, blocking them is pointless: you'd be blocking legitimate DNS servers and the attacker would simply use others. Network operators can prevent spoofing with ingress filtering, described in BCP 38 (RFC 2827), but it is far from universal.
Defence: UDP floods must be stopped before they reach your connection — in the network upstream, by dropping traffic from known amplification ports, limiting traffic to ports you don't use, and validating that packets match the protocol your service actually speaks.
SYN flood: exhausting the connection table
Every TCP connection starts with a three-way handshake:
Client → SYN → Server "I'd like to connect"
Client ← SYN-ACK ← Server "OK, here's my reply" (server stores a half-open entry)
Client → ACK → Server "Confirmed" (connection established)
In a SYN flood the attacker sends a torrent of SYN packets, usually from forged addresses, and never sends the final ACK. The server keeps a half-open entry for each one in its SYN backlog. When that backlog is full, real clients can't connect — even though the bandwidth may be nowhere near exhausted.
Defence on the server: Linux supports SYN cookies (RFC 4987). Instead of storing state for every SYN, the server encodes it in the sequence number of its reply and only creates the connection when a valid ACK comes back. Check that it is on:
sysctl net.ipv4.tcp_syncookies
# 1 = cookies are used when the SYN queue overflows (the default)
sudo sysctl -w net.ipv4.tcp_syncookies=1
Defence in the network: at large scale, protocol-aware filters in front of the server verify that clients complete the handshake before their connections are passed on. Related attacks, such as ACK and RST floods, are filtered the same way — by tracking which packets belong to a real connection.
HTTP flood: death by a thousand page views
An HTTP flood works at layer 7. Every request is a complete, valid TCP (and often TLS) connection followed by a normal-looking HTTP request. Spoofing is impossible here, because a handshake needs a real return path — so the source IPs are real, usually belonging to botnets or open proxies.
- GET floods target pages that can't be cached: search results, filtered product lists, a shopping cart.
- POST floods target forms, logins and APIs, where every request triggers database queries, password hashing or emails.
A few hundred requests per second to a WordPress search page can bring a server to its knees, while the bandwidth graph barely moves.
Defence: a reverse proxy or web application firewall that can challenge suspicious clients, rate limits on expensive endpoints, and aggressive caching. On your own Nginx server, a simple rate limit on the login page looks like this:
# In the http { } block
limit_req_zone $binary_remote_addr zone=login:10m rate=10r/m;
# In your server { } block
location = /wp-login.php {
limit_req zone=login burst=5 nodelay;
limit_req_status 429;
# ... your existing PHP handling, e.g. include snippets/fastcgi-php.conf;
}
Test with sudo nginx -t and reload with sudo systemctl reload nginx. Our guide to installing Nginx on Ubuntu covers the basics, and speeding up WordPress helps with caching.
Who stops what
Good DDoS defence is layered, and each layer has a job:
- The network upstream absorbs volumetric and protocol attacks — UDP floods, amplification, SYN floods — before they reach your connection.
- Your server keeps its own defences: SYN cookies, a firewall that only opens the ports you need, and sensible kernel defaults. See configuring a firewall on your Linux VPS.
- Your application handles layer 7: rate limits, caching, a WAF or reverse proxy for public websites.
What that means in practice:
- A game server or VPN mostly needs strong network-level filtering, since it speaks UDP directly on its IP.
- A webshop needs both: network filtering for the floods, and application-level protection for its search, cart and checkout.
Telling an attack from a busy day
Not every spike is an attack. A newsletter, a TV mention or a viral post can look like an HTTP flood. Signs it's real traffic: visitors load many different pages, fetch images and scripts, come from search engines or social links, and convert. Signs it's a flood: the same URL hit at a steady rate, no asset requests, odd or identical user agents, and a sudden start and stop.
# Top requested URLs in the last 10,000 lines of the Nginx access log
tail -n 10000 /var/log/nginx/access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head
In short
UDP floods attack bandwidth with connectionless and often amplified traffic; SYN floods fill the server's table of half-open connections; HTTP floods exhaust the application with requests that look real. The first two must be filtered in the network, with SYN cookies as a safety net on the server. The third is handled by caching, rate limiting and a web application firewall. Blocking individual IPs fails against the first two because the sources are forged, and against the third because there are too many of them.
How Hostigan handles floods
Every Hostigan service sits behind always-on, protocol-aware DDoS filtering from our partner PletX, which works upstream before traffic reaches our network. Read how Hostigan's DDoS protection works to see what it covers and what you should still handle yourself.
Frequently asked questions
UDP floods, because most game protocols run over UDP and the server has to look at every packet. Amplification attacks using DNS, NTP or similar services are common too.