DediMetal

DDoS Protection Explained: Layer 3, 4 and 7 Attacks

A DDoS attack tries to make a service unreachable by overwhelming it. What stops it depends on the layer it targets — and so does who has to stop it.

Last updated 17 November 2026

  • Layers 3 and 4: floods aimed at the network
  • Layer 7: requests aimed at the application
  • Network filtering stops the first kind
  • Rate limits and caching handle the second

What a DDoS attack is

A distributed denial-of-service (DDoS) attack sends traffic from many sources at once to exhaust something the target needs: the capacity of its network link, the connection tables of its operating system, or the processing time of its application.
Attacks are usually classified by the layer of the network model they aim at. The distinction matters in practice, because each kind is stopped in a different place.
Streams of light converging on a rack server and stopped by a glowing amber shield in front of it

Layers 3 and 4: volumetric and protocol attacks

Volumetric attacks simply send more traffic than the link can carry. UDP floods and ICMP floods are the plain versions; reflection and amplification attacks bounce small spoofed requests off open DNS, NTP or memcached servers, which reply to the victim with far larger answers.
Protocol attacks abuse the way connections are set up. A SYN flood opens thousands of half-finished TCP handshakes per second until the server can accept no new connection; ACK and RST floods force it to look up packets that belong to no session.
Neither kind can be stopped on the server itself: by the time the packets reach its port, the link is already full. They have to be filtered upstream, in the provider’s network.

Layer 7: application attacks

Application-layer attacks look like legitimate use. An HTTP flood requests expensive pages over and over; a slow-request attack holds connections open with a trickle of data; an API is called in bulk. Each request is valid — there are simply too many, or they cost too much to serve.
Because the traffic is well-formed, network filtering lets it through. It is handled where the logic of the application is understood: in the web server, a reverse proxy, a web application firewall or the application itself.

What a host’s filtering does

Always-on mitigation inspects traffic as it enters the provider’s network and drops what matches attack patterns — floods, amplified replies, malformed handshakes — before it reaches the customer’s port. “Always-on” means that traffic passes through the filters permanently, rather than being diverted after an attack has been detected.
Every server we rent is behind always-on L3/⁠L4 filtering that covers each of its IP addresses, at no extra cost. See DDoS protected dedicated servers.

What remains your job

For application-layer attacks, a few measures cover most cases:
  • Rate limiting per address and per endpoint, in nginx, HAProxy or the application.
  • Caching, so that repeated requests for the same page cost almost nothing.
  • Connection limits and timeouts, to shed slow-request attacks.
  • A web application firewall or a challenge page for endpoints that are expensive to serve.
  • A host firewall that only opens the ports you use.
Spare capacity helps as well: a server with idle cores and an unmetered port absorbs a burst that would saturate a small instance, and attack traffic that does get through is never billed.

Before an attack: a short checklist

  • Know your normal traffic, so that an anomaly is obvious.
  • Test your out-of-band access (IPMI/KVM): it does not depend on the server’s operating system.
  • Do not expose services that can be used as amplifiers: open DNS resolvers, NTP monlist, memcached over UDP.
  • Put rate limits in place before you need them.
  • Keep backups on another machine: an attack is sometimes a diversion.

What is filtered, and where.

Network-layer attacks are filtered in our network before they reach your port. Application-layer attacks look like normal use and are handled on the server.
Types of DDoS attack, examples, network layer and where each one is stopped
Attack typeExamplesLayerStopped by
Volumetric floodsUDP floods, ICMP floodsLayers 3–4Our network, always on
Reflection and amplificationSpoofed requests bounced off open DNS, NTP or memcached serversLayers 3–4Our network, always on
Protocol attacksSYN floods, ACK and RST floods, fragmented packetsLayers 3–4Our network, always on
HTTP floodsPages, searches or downloads requested over and overLayer 7Your server: rate limits, caching, WAF
Slow-request attacksConnections held open with a trickle of dataLayer 7Your server: rate limits, caching, WAF
Application-protocol floodsValid-looking DNS, game or API queries sent in bulkLayer 7Your server: rate limits, caching, WAF

L3/⁠L4 filtering is included with every server and covers each of its IP addresses.

Questions and answers

What is the difference between layer 3/4 and layer 7 DDoS attacks?

Layer 3 and 4 attacks flood the network or abuse TCP and UDP to saturate a link or a connection table; they are filtered in the provider’s network. Layer 7 attacks send valid-looking application requests, such as HTTP floods, and are handled by rate limiting, caching or a web application firewall.

Can a firewall on my server stop a DDoS attack?

Only a small one. A host firewall drops packets after they have crossed the link, so it cannot help once the link is saturated. Volumetric attacks have to be filtered upstream, before they reach the server’s port.

What does “always-on” DDoS protection mean?

Traffic passes through the mitigation system permanently, so filtering starts with the first packets of an attack. The alternative, on-demand mitigation, reroutes traffic through filters only after an attack has been detected.

Is DDoS protection included with your servers?

Yes. Always-on L3/⁠L4 DDoS filtering protects every IP address at no extra cost, so a flood aimed at your server doesn’t take it offline.

Ready to deploy?

AMD EPYC servers from $199/⁠mo, online in under 5 minutes, with no setup fee.