Skip to content
HOSTIGAN
Security

What is a DDoS attack, and how do you protect your server?

A DDoS attack floods your server with traffic from thousands of sources. Learn how attacks work, the signs to watch for and how network-level protection stops them.

Beginner 5 min read Updated November 24, 2026

A DDoS attack doesn't try to break into your server. It tries to make it unreachable, by sending far more traffic than the server or its network connection can handle. To the people trying to visit your website, join your game server or log in to your application, it simply looks as if you're down. This guide explains how DDoS attacks work, where the traffic comes from, how to recognise one, and why real protection has to sit in the network rather than on your server.

DoS vs. DDoS

A DoS (denial of service) attack comes from one source: one machine sending a flood of requests. It's annoying but relatively easy to deal with, because you can block that one IP address.

A DDoS (distributed denial of service) attack comes from thousands or even hundreds of thousands of sources at once, spread across the world. There is no single address to block, the traffic often looks normal packet by packet, and the combined volume can be far larger than any single connection.

The goal is disruption, not data theft. Attackers use DDoS for extortion, revenge, competition — rival game servers are a frequent motive — or as a smokescreen while they try something else.

Where the attack traffic comes from

Two techniques produce most of the volume.

Botnets. A botnet is a network of infected devices controlled from one place. Many of them are cheap internet-connected cameras, routers and other gadgets still running factory passwords. Their owners have no idea. Access to botnets is rented out as "booter" or "stresser" services for a few euros, which is why even small websites and game servers get hit.

Reflection and amplification. Here the attacker sends small requests to open services on the internet — DNS resolvers, NTP servers, memcached and others — but forges the source address so it looks like the request came from you. Those services reply with answers that can be many times larger than the question, and all of them go to your server. The attacker spends a little bandwidth; you receive a lot.

Tip: Don't become part of the problem. Never run an open DNS resolver or a publicly reachable NTP or memcached service on your own server — they are exactly what attackers look for to amplify traffic.

Three layers of attack

DDoS attacks are usually grouped by the network layer they target. The layer decides where the attack can be stopped.

LayerWhat is attackedExamplesWhere it's stopped
Layer 3 – networkRaw bandwidth and routersICMP floods, amplificationIn the network, upstream
Layer 4 – transportTCP and UDP connection handlingSYN floods, UDP floodsIn the network, with protocol checks
Layer 7 – applicationYour web server, logins, search, APIsHTTP GET/POST floodsReverse proxy, WAF, rate limiting, caching

Layer 3 and 4 attacks are about volume and packet counts. Layer 7 attacks use far less traffic, but every request looks like a real visitor and forces your application to do expensive work. We compare the three most common types in detail in UDP flood vs. SYN flood vs. HTTP flood.

Signs that you're under attack

  • The site or service becomes slow or unreachable without any change on your side.
  • Bandwidth or packet graphs show a sudden spike far above normal.
  • Game players lag or disconnect in large numbers at the same moment.
  • Logs fill with requests from many different IP addresses, often to the same URL.
  • SSH or Remote Desktop sessions become unstable or drop.

None of these prove an attack on their own. A viral post, a broken cron job or a failing disk can look similar. Check traffic graphs and logs first — our guide to monitoring CPU, RAM, disk and network shows which tools to use.

Why your server firewall can't stop it

A firewall on the server is important, but it can't solve a large DDoS attack, for two reasons:

  1. The pipe fills before the firewall sees anything. If your server has a 1 Gbit/s connection and 20 Gbit/s of junk is heading for it, the link is saturated upstream. Your firewall drops nothing, because the packets never get through — and neither does legitimate traffic.
  2. Dropping packets still costs CPU. Even when the link holds, inspecting and discarding millions of packets per second can use up the server's processors.

That's why effective DDoS protection sits in front of the server, in a network with far more capacity than any single machine.

How DDoS mitigation works

Network-level protection follows the same basic pattern:

  1. Detection — traffic is compared against what's normal for the destination.
  2. Coarse filtering — obvious junk, such as traffic from amplification ports or malformed packets, is dropped at the edge of the network.
  3. Protocol-aware filtering — traffic is checked against how TCP, UDP and specific applications are supposed to behave.
  4. Clean delivery — the remaining, legitimate traffic is forwarded to your server.

Protection is either on-demand — traffic is rerouted to a filter only after an attack is detected — or always-on, where traffic passes through the filter all the time. Always-on avoids the gap of seconds or minutes while an attack is detected and rerouted, which is exactly when an on-demand setup lets the first wave through.

For websites, a reverse proxy or web application firewall adds layer 7 protection on top: it can challenge suspicious clients, rate-limit and serve cached pages.

What you can do yourself

Network protection handles volume. These steps reduce your exposure and handle the rest:

  • Close everything you don't use. On Ubuntu or Debian with ufw:

    sudo ufw default deny incoming
    sudo ufw default allow outgoing
    sudo ufw allow 22/tcp
    sudo ufw allow 80,443/tcp
    sudo ufw enable
    

    More on this in how to configure a firewall on your Linux VPS.

  • Don't publish your origin IP if your website sits behind a proxy — check old DNS records and mail headers.

  • Rate-limit logins, search and API endpoints, and cache pages that don't need to be dynamic.

  • Know your normal traffic, so you can recognise an abnormal spike.

  • Have a plan: who to contact, which data to send, how to tell users.

Note: DDoS protection does not stop brute-force logins, outdated plugins or weak passwords. Those need their own measures — see how to secure your VPS.

In short

A DDoS attack overwhelms a service with traffic from many sources, usually botnets or amplification. Layer 3 and 4 attacks have to be filtered in the network before they reach your server; layer 7 attacks are handled with caching, rate limiting and a web application firewall. You can reduce your exposure yourself, but stopping large floods requires always-on protection upstream.

DDoS protection at Hostigan

Every Hostigan service includes always-on, upstream DDoS protection from our partner PletX, at no extra cost and with nothing to switch on. Read how Hostigan's DDoS protection works for the details.

Frequently asked questions

Anything from a few minutes to several days. Many attacks bought from booter services run in short bursts of minutes and are repeated, while targeted campaigns can go on much longer.

Next in “A secure server” · 2 of 7UDP flood vs. SYN flood vs. HTTP flood: what's the difference?