DDoS filtering on every server

Yes, every CheapVPS server is protected: network-level DDoS filtering runs in front of all of them in every city, included in the price with nothing to switch on. It absorbs volumetric and protocol floods; application-layer floods that look like real visitors are handled best with your own rate limits and caching on the server.

What is a DDoS attack?

A distributed denial of service attack tries to make a service unreachable by sending more traffic or more requests than it can handle, from many sources at once. Because the traffic comes from thousands of machines, blocking one address does nothing. Attacks fall into three broad groups:

  • Volumetric: raw bandwidth floods, often UDP reflection where open DNS, NTP or memcached servers are tricked into sending large replies to your IP. The goal is to fill the pipe before packets even reach your server.
  • Protocol: attacks that exhaust state in network stacks, such as SYN floods that leave half-open connections, or floods of malformed and fragmented packets.
  • Application layer: requests that look valid, for example thousands of HTTP GETs per second to an expensive search page, or repeated login attempts. Each request is small, but each one makes your application do real work.

The first two are network problems and are filtered before they reach you. The third one needs knowledge of your application, which is why it is partly your job.

How does the network filtering work?

Traffic to every server passes through filtering at the edge of our network. It watches flows towards each IP address, recognises attack patterns such as reflection floods and SYN floods, and drops the attack packets while normal traffic continues to your server. Nothing needs to be enabled, there is no separate plan, and it applies the same way in all 15 cities, on every family from S4 to D192.

Filtering is automatic and always on, so a typical attack is handled without you noticing more than a brief bump in latency. Incoming traffic is free on every plan, so attack traffic aimed at you never counts against your allowance; only outgoing traffic is measured.

Because the filtering works on packets and flows, it does not read the content of your encrypted connections and needs no certificate or change on your side.

What does network filtering not cover?

Network filtering cannot tell a malicious HTTP request from a real visitor when both are well-formed TCP connections that completed the handshake. A flood of valid requests to /search?q=random or /wp-login.php passes through, and your server then spends CPU, memory and database time on each one.

The same applies to:

  • Brute-force login attempts on SSH, mail or admin panels.
  • Slow attacks that keep many connections open with partial requests.
  • Scrapers and bots that request pages faster than your application can render them.
  • Abuse of an API endpoint that is cheap to call but expensive to answer.

These are solved on the server itself with rate limits, caching and blocking tools, all of which run fine on a small plan. The next sections show the standard setup.

How do you rate-limit requests in Nginx?

Nginx has a built-in request limiter. Define a zone in the http block of /etc/nginx/nginx.conf, then apply it where it matters:

http {
    limit_req_zone $binary_remote_addr zone=perip:10m rate=10r/s;
    limit_conn_zone $binary_remote_addr zone=conns:10m;
}

server {
    location / {
        limit_req zone=perip burst=30 nodelay;
        limit_conn conns 20;
    }
    location = /wp-login.php {
        limit_req zone=perip burst=5;
    }
}

The zone stores one entry per client IP in 10 MB of shared memory, enough for well over a hundred thousand addresses. burst lets a real browser load a page with its assets without hitting the limit. Requests above the limit get HTTP 503 by default; set limit_req_status 429; if you prefer the more precise code. Test and reload with nginx -t && systemctl reload nginx.

For slow-connection attacks, tighten client_header_timeout and client_body_timeout to 10~15 seconds. The full web server setup is in Nginx with HTTPS.

How does fail2ban block repeat offenders?

fail2ban reads log files, counts failures per IP address and adds a temporary firewall block when a threshold is crossed. On Ubuntu 24.04 or Debian 13:

apt -y install fail2ban
cat > /etc/fail2ban/jail.local <<EOF
[DEFAULT]
bantime = 1h
findtime = 10m
maxretry = 5
backend = systemd

[sshd]
enabled = true

[nginx-limit-req]
enabled = true
logpath = /var/log/nginx/error.log
backend = auto
EOF
systemctl enable --now fail2ban
fail2ban-client status sshd

The nginx-limit-req jail bans clients that keep tripping the Nginx limit from the previous section, so a bot that ignores 429 answers is dropped at the firewall instead of costing you a request each time. On Rocky Linux or AlmaLinux, install it with dnf -y install epel-release fail2ban.

Why does caching help against floods?

The cheapest request is the one your application never sees. A page served from cache costs a fraction of a millisecond of CPU, while the same page rendered by PHP or a framework can cost 50~200 ms plus database queries. Under a flood that difference decides whether the server stays up.

  • Full-page cache: Nginx fastcgi_cache or proxy_cache stores rendered pages for anonymous visitors. Even a 10 second cache lifetime turns a thousand identical requests into one.
  • Object cache: Redis or Memcached keep database results in memory, so search and listing pages stay fast.
  • Static files: serve images, CSS and JavaScript directly from Nginx with long expires headers.

Pair caching with a plan that leaves headroom. On a busy site, a Dedicated CPU plan keeps response times steady because no neighbour shares your cores.

How do you harden a server against attacks?

A smaller attack surface leaves fewer things to flood. Start with a firewall inside the OS that allows only the ports you really use:

ufw default deny incoming
ufw default allow outgoing
ufw allow OpenSSH
ufw allow 80,443/tcp
ufw enable
ss -tulpn

The last command lists every listening socket. Anything you do not recognise should be stopped or bound to 127.0.0.1. Databases, Redis and admin dashboards belong on localhost or behind a WireGuard tunnel, never on the public address. A few more habits pay off:

  • Use SSH keys only and disable password logins, as shown in SSH hardening.
  • Turn off UDP services you do not need; open resolvers and NTP servers get abused for reflection.
  • Enable unattended security updates so known holes close on their own.
  • Raise net.ipv4.tcp_max_syn_backlog and keep net.ipv4.tcp_syncookies = 1 (the default on modern kernels).

The step-by-step version is in firewall setup and firewall rules explained.

What should you do during an attack?

First, find out what kind of attack it is. Log in over SSH and look at the server from the inside:

uptime
ss -s
ss -tn state syn-recv | wc -l
tail -f /var/log/nginx/access.log
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head

High load with a busy access log means an application-layer flood: tighten the Nginx limits, enable caching for the targeted path and let fail2ban ban the top sources. A clean access log while the server is unreachable from outside points to a network attack, which the filtering handles.

If the service stays unreachable or you see heavy packet loss, open a ticket with the server name, the start time in UTC, the target port and protocol (for example 443/tcp or 27015/udp) and an mtr report from your own computer. Those facts let us match the event in our network quickly.

Which workloads attract attacks most often?

Game servers, public voice servers, small shops during sales, and anything that has angered someone online. Game servers in particular run on UDP, where floods are common; keep their query ports closed when not needed and run the game daemon as an unprivileged user. Sites that only need to be online for a known audience can also hide behind a reverse proxy on a second server, so the origin address is never published. HAProxy works well for that pattern.

Plans to start with

Prices are per month; the order total is the shortest term that reaches $40.

PlanWhySizePer monthOrder from
P2A small site or bot with Nginx limits and fail2ban in front, sold in all 15 cities1 vCPU, 2 GB RAM, 40 GB NVMe$6.95$41.70 for 6 months
P4Web apps that need spare CPU to keep serving cached pages under a flood2 vCPU, 4 GB RAM, 80 GB NVMe$12.05$72.30 for 6 months
D8Game and voice servers where steady dedicated cores keep play smooth during attacks2 vCPU, 8 GB RAM, 80 GB NVMe$25.85$77.55 for 3 months

DDoS filtering questions

Does DDoS filtering cost extra?

No. It is included on every plan in every city, and there is nothing to order or switch on.

Does attack traffic use up my included traffic?

No. Only outgoing traffic is counted, and incoming traffic, including attack floods, is free.

Will my server be switched off during an attack?

The filtering is designed to drop attack packets and keep normal traffic flowing to your server. If you see problems, open a ticket with the times and the target port.

Can I see attack statistics in the console?

The console has no traffic graph for attacks. Use tools on the server such as vnstat, ss -s and your web server logs to see what is happening.

Does the filtering stop HTTP floods?

Floods made of valid HTTP requests need application-level defence: Nginx limit_req, fail2ban and caching, as shown above.

Is there a cloud firewall in the console?

No. You set firewall rules inside the OS with ufw or nftables; see firewall setup.

Ready for a server?

Create an account key, pick a plan and a city, and pay the order in crypto.