DDoS Protection for a Small Server Without a Big Budget
The first time one of my game servers got knocked offline, I spent two hours convinced the host had a network fault. Ping from my flat was fine. Ping from the server to anywhere was fine.

The first time one of my game servers got knocked offline, I spent two hours convinced the host had a network fault. Ping from my flat was fine. Ping from the server to anywhere was fine. Players could not connect, and the box itself was responsive over SSH because my provider had already null routed the public address. That is what a successful attack on a small server usually looks like: not a burning machine, just a quiet hole where your service used to be.
The attack lasted eleven minutes and cost somebody about five dollars. I know roughly what it cost because the services that sell this are advertised openly, charge by the month, and the cheapest tiers are priced like a sandwich. If you run anything on the public internet with a competitive community attached to it, you are in range of a teenager with a debit card, and nothing about your server size makes you a harder target.
What actually reaches a small server
Two different things get called the same name, and they need different answers.
Volumetric floods try to fill your pipe. The common method is reflection and amplification: the attacker sends small spoofed requests to thousands of misconfigured public services, which reply to your address with far larger packets. DNS, NTP, memcached and CLDAP have all been used this way, and the amplification ratios run from around 50 times for DNS to several thousand for memcached. A rented service with 200 Gbps of capacity does not need skill, and your 1 Gbps port fills instantly. Nothing you configure on the server can help here, because the saturation happens upstream of your network card.
What usually follows is worse than the attack. Budget hosts protect their own network by null routing the target address, often for an hour or 24 hours, sometimes automatically on any traffic spike. The attack stops in minutes. Your downtime is set by your provider's policy.
Application layer attacks are much smaller and aimed at your software. For a web server that means floods of expensive requests, usually to search pages or anything that touches a database. For a game server it often means abusing the server list query protocol, which answers a tiny UDP packet with a full player list and so turns your own server into the amplifier. The Source query port and the Minecraft status ping have both been used like this. Traffic volume here can be under 50 Mbps and still take the service down.
Telling the two apart during an incident matters, and the fastest check is whether packets are arriving at all. If your interface counters are climbing and your logs are full, it is application layer. If your interface is silent and nobody can reach you, you are already null routed.
The counter-take: your firewall is not DDoS protection
Search for this problem and the first five results tell you to configure firewall rules, tune kernel parameters and install fail2ban. I have done all three on every server I run, and none of it would have saved me that evening.
A packet dropped by your own firewall has already crossed your provider's network and consumed your bandwidth. The drop is free in CPU terms and worth nothing in capacity terms. Kernel tuning helps with SYN floods specifically, because SYN cookies let you refuse half open connections cheaply, and that is a genuine win. It does nothing about a UDP flood that arrives as raw volume.
Where local hardening does pay off is the long tail of small nuisances: credential stuffing on an admin panel, scrapers, someone hammering a login endpoint. That is real work and worth doing, and the setup in our notes on stopping brute force logins with fail2ban covers it. Just file it under abuse handling rather than under capacity, because the two problems only look alike from a distance.
The other claim worth retiring is that small services are too boring to attack. Motive is usually not commercial. In community gaming the motive is a grudge, and the cost of acting on a grudge is now under ten dollars.
What works, and what each option costs
Everything that genuinely helps involves somebody with a bigger network absorbing the traffic before it reaches you. The practical choices for a small budget look like this.
| Approach | Works for | Rough cost | Main drawback |
|---|---|---|---|
| Reverse proxy through a CDN with free tier | HTTP and HTTPS only | Free to about 25 a month | Useless for game and UDP traffic, and leaks if your origin IP ever shows |
| Host with filtering included at the network edge | Everything on that IP | Built into the VPS price | Quality varies wildly; some vendors still null route under load |
| Game specific proxy service | Minecraft, Source engine, a few others | Free tier up to around 15 a month | Adds 5 to 20 ms of latency and you must trust the operator |
| Scrubbing centre over a tunnel | Any protocol | Roughly 30 to 200 a month | Setup is fiddly and the tunnel itself becomes a failure point |
| Separate IP per service | Limiting damage | A few dollars per address | Does not stop anything, only stops one attack taking everything down |
For most people reading this, the honest answer is the second row. Choosing a provider whose filtering is always on and who does not blackhole customer addresses is a single decision that outperforms a weekend of configuration. Before you commit, read the provider's actual policy page rather than the marketing page, and search their status history for the word mitigation. A host that documents thresholds in Gbps and packets per second has thought about it. A host whose only statement is that attacks are prohibited in the terms of service has not.
The last row is underrated. I now run the public game port on one address and everything administrative, including SSH, the web panel and monitoring, on another. When the game address went down last spring I could still log in, read logs and tell forty people what was happening. Separation did not prevent the outage. It changed it from a blackout into an inconvenience.
The hardening that is worth doing first
Four things, in the order I would do them on a new box. None of them cost money.
Keep your origin address off the public record. If you put a web service behind a proxy, the proxy is pointless once somebody finds the real address, and the usual leaks are old DNS records, mail sent directly from the box, and TLS certificate transparency logs. Check what history exists for yourdomain.com in a passive DNS lookup before you assume you are hidden.
Turn off query and status protocols you do not need. On a game server the server list ping is often optional or can be bound to a local interface only. If you want it public, cap how often a single address can ask. This is the single highest value change for anyone running Source or Minecraft servers.
Rate limit at the connection level rather than the request level for anything exposed. The firewall modules that count concurrent connections per source address are cheap to run and stop the dumbest third of traffic. If your firewall is not set up at all yet, a basic UFW setup takes about ten minutes.
Measure your normal numbers now, while nothing is wrong. Write down your usual packets per second, bandwidth, connection count and median latency to two or three places. During an incident the most expensive question is whether what you are looking at is abnormal, and you cannot answer it without a baseline. The method in tracing game server latency with mtr and iperf3 gives you numbers worth keeping.
I have no clean statistics on how often any of this is what saves a server, because the attacks that get stopped early leave no story behind. What I can say is that the two incidents I handled badly were both ones where I had no baseline and no second address to log in from.
FAQ
Can I stop a DDoS attack from the server itself?
Only the application layer kind, and only partly. Volume that fills your network port has already cost you the bandwidth by the time your kernel sees it, so mitigation has to happen upstream.
Does a free CDN tier protect a game server?
No. The free tiers proxy HTTP and HTTPS. Game traffic is usually UDP on a custom port, which needs either a game specific proxy or filtering from your host.
Why did my host block my own IP address during an attack?
Null routing the target is the cheapest way for a provider to protect every other customer on that network. It is normal on budget hosting and the duration is set by their policy, not by the attacker.
Is it worth reporting an attack?
Report it to your host, because they have the traffic captures and may raise your thresholds. Reporting to police rarely goes anywhere for a short attack, though it matters if there is extortion attached.
More on locking down the rest of the stack sits in the security section.
More in Security
Security
Locking Down Your Domain Registrar Account the Right Way
A founder wrote to me last spring because his company email had stopped arriving. Not bouncing, just silent.
Security
Leaked Secret in Git and How to Clean It Up the Right Way
You pushed a commit, looked at the diff a minute later, and saw an API key sitting in plain text in a config file.
Security
Employee Offboarding Checklist to Revoke Access on Day One
Someone on your team hands in their notice, and three weeks later you discover their SSH key still opens the production box.