Security & Backups9 min read•Last updated: •By SkyRain Cloud Team

How to Protect Your Dedicated Server from DDoS Attacks

The first sign is usually a flood of alerts: the site is timing out, the game server is empty, SSH is sluggish. A distributed denial-of-service attack is trying to drown your server in traffic. Knowing how to protect a dedicated server from DDoS attacks before one starts turns a crisis into a manageable incident.

The short answer: rely on your provider's upstream filtering for large floods, hide your origin IP behind a CDN or proxy, harden the server against smaller attacks with firewall limits and kernel settings, protect your application with rate limits and caching, and keep a written runbook. If you are still choosing a provider, read our buyer's guide to dedicated servers with DDoS protection; this guide is about what you do on your side.

Quick answer

To protect a dedicated server from DDoS attacks: use a provider with always-on upstream mitigation, hide your origin IP behind a CDN or reverse proxy, allow only needed ports in the firewall, rate-limit connections and requests, enable SYN cookies and sensible kernel limits, cache aggressively, separate public and admin services, monitor traffic and response times, and follow a pre-written incident runbook when an attack begins.

Know what you are defending against

Attack typeExampleMain defence
Volumetric (Layer 3/4)UDP floods, DNS/NTP amplificationProvider upstream filtering
ProtocolSYN floods, fragmented packetsUpstream filtering, SYN cookies, firewall
Application (Layer 7)HTTP floods, login or search abuseCDN/WAF, rate limits, caching
Game protocolQuery floods, fake connectionsGame-aware filtering, proxies

Cloudflare's overview of DDoS attack types explains each in more depth.

Protect a dedicated server from DDoS – SkyRain Cloud bare metal servers in India

How to protect a dedicated server from DDoS: 10 steps

  1. Confirm your provider's protection. Know whether it is always-on, what it covers and the null-route policy.
  2. Hide the origin IP. Put websites behind a CDN or reverse proxy and stop publishing the server's real IP in DNS, emails or old records.
  3. Close every unnecessary port. Follow our firewall best practices.
  4. Restrict origin access. If you use a CDN, allow web traffic only from the CDN's IP ranges.
  5. Enable SYN cookies and tune connection limits in the kernel.
  6. Rate-limit at the web server for login, search, checkout and API endpoints.
  7. Cache aggressively so floods hit cached pages, not your database.
  8. Separate admin from public services: admin panels behind a VPN, not on the public site.
  9. Monitor traffic and latency so you notice attacks within minutes.
  10. Write and practise a runbook.

Hiding your origin IP

Attackers cannot flood what they cannot find. When a CDN or proxy sits in front of your site, visitors and attackers see the CDN's addresses. Common ways origin IPs leak:

  • Old DNS records (such as direct.example.com or mail.example.com) pointing at the server.
  • Emails sent directly from the web server, which include its IP in headers.
  • Historical DNS databases from before you added the CDN.
  • Services such as FTP or game ports on the same IP.

If your origin has leaked, consider moving to a new IP after the CDN is in place. Our guide to configuring a CDN with your dedicated server covers the setup.

Server-side hardening

On Linux, a few settings help the server cope with smaller floods:

  • net.ipv4.tcp_syncookies = 1 to survive SYN floods.
  • Larger connection tracking and backlog limits sized for your memory.
  • Firewall rules that drop invalid packets and limit new connections per IP.
  • Web server timeouts that close slow or idle connections quickly.

These do not stop large volumetric attacks, which saturate the port before the kernel sees them, but they handle the smaller attacks that slip through.

Defending against application-layer attacks

Layer 7 attacks look like real visitors, so they need application-aware defences:

  • Rate limits per IP and per session on expensive endpoints.
  • Bot challenges or a web application firewall at the CDN.
  • Caching for anonymous pages, so floods do not reach PHP or the database.
  • Queues for heavy tasks such as exports and report generation.
  • A "lite mode" that disables expensive features (search, recommendations) during an attack.

A reverse proxy is a natural place for many of these controls; see setting up a reverse proxy.

Your DDoS runbook

PhaseActions
DetectAlerts on traffic, latency and errors; confirm it is an attack, not a bug or a genuine spike
EngageOpen a ticket with your provider including IP, start time and graphs; message on the fast channel
MitigateEnable stricter CDN/WAF rules, tighten rate limits, switch on lite mode, block obvious sources
CommunicateStatus update to customers; internal updates every 30 minutes
RecoverGradually relax rules, verify normal service, keep monitoring
ReviewWhat worked, what leaked the origin, what to change

Capacity planning as a defence

Some attacks are not huge; they simply push a server that was already near its limits over the edge. A site that runs at 80% CPU on a normal evening has little room to absorb a modest Layer 7 flood, while the same site at 20% can shrug it off while rate limits kick in. Spare capacity buys time to respond. Keep peak utilisation comfortably below the ceiling, make sure caching is doing its job, and move heavy background work away from peak hours. Headroom is not wasted money; it is part of your resilience.

What to monitor so you see attacks early

  • Inbound traffic rate in packets and bits per second, with alerts on sudden jumps.
  • New connections per second and connection-table usage.
  • Response times and error rates for key pages and APIs.
  • Requests per IP or per endpoint in web server logs.
  • CPU, memory and PHP or application worker saturation.

Keep a baseline of normal traffic for each day of the week. Attacks stand out much more clearly against a known baseline than against a guess. Our guide to monitoring server uptime and performance explains how to set this up with free tools, and a few graphs on a shared screen make the first minutes of an incident far calmer.

Special notes for game servers

  • Use game-aware filtering where available; generic rules can break game traffic.
  • Hide backend servers behind a proxy (for example Velocity for Minecraft networks).
  • Keep query ports closed or tightly rate-limited from the start.
  • Expect attacks after bans or community drama, and keep the runbook handy.

A hypothetical attack, handled well

On the first evening of a sale, an online store's monitoring shows requests to its search page jumping to fifty times normal, all from thousands of different IPs. The upstream network filtering is already absorbing a separate UDP flood, so the port is fine, but PHP workers are saturating. The on-call developer follows the runbook: turns on a bot challenge for the search path at the CDN, tightens the per-IP rate limit on search, and temporarily serves cached results for popular queries. Response times recover within fifteen minutes. A short note goes to customers on social media, and the next morning the team adds permanent caching for search and a cheaper fallback for anonymous visitors. Sales lost: a handful. Without the layers and the runbook, the store would likely have been down for hours on its most important night.

Mistakes that make DDoS worse

  • Publishing the origin IP in DNS or emails after adding a CDN.
  • Running admin panels on the public site.
  • No caching, so every request hits PHP and the database.
  • No monitoring, so customers report the attack before you notice it.
  • No runbook, so the team improvises under pressure and makes changes nobody records.

Why businesses choose SkyRain Cloud dedicated servers

SkyRain Cloud builds the first layer of DDoS defence into every dedicated server:

  • Indian data centers, Indian latency. Intel Xeon dedicated servers are hosted in Mumbai and Delhi, close to customers across India.
  • The whole machine is yours. 100% unshared hardware: no other tenants competing for CPU, memory or disk.
  • DDoS protection included on the network, so a flood aimed at your IP does not have to become your problem alone.
  • Full control. Root or Administrator access plus iLO/IPMI out-of-band management to reboot, reinstall or mount your own ISO.
  • Real support channels. 24/7 support tickets, WhatsApp and a Discord community, plus a public status page.
  • Simple billing. Monthly billing in rupees with UPI, net banking and cards.

Frequently Asked Questions

Can I stop a DDoS attack on my own server?
You can handle small attacks with firewall rules, rate limits and caching. Large volumetric attacks fill your network port before your server can act, so upstream provider protection is essential.
How do I hide my server's IP from attackers?
Put your sites behind a CDN or reverse proxy, remove DNS records pointing at the origin, send email through a separate service or IP, and allow web traffic only from the CDN's IP ranges.
What are SYN cookies?
A Linux kernel feature that lets the server handle large numbers of half-open TCP connections during a SYN flood without running out of resources.
What should I do first when a DDoS attack starts?
Confirm it is an attack, open a ticket with your provider with your IP and graphs, tighten CDN and rate-limit rules, and update customers. Follow your runbook.
Does SkyRain Cloud protect dedicated servers from DDoS?
Yes. DDoS protection is included on SkyRain Cloud dedicated servers. Combine it with the server-side and application measures in this guide for best results.
Will a CDN protect my game server?
Usually not, because most game traffic is not HTTP. Use your provider's network protection, game-aware filtering and proxies to hide backend servers.

Conclusion

To protect a dedicated server from DDoS attacks, combine upstream provider filtering with a hidden origin, a strict firewall, kernel hardening, application rate limits and caching, and a practised runbook. No single measure stops every attack, but together they keep you online.

Start with DDoS protection built in: compare the plans below, or see the details on our dedicated server page.

SkyRain Cloud Dedicated Server Plans

Unshared Intel Xeon bare-metal servers in Mumbai and Delhi data centers with 1 Gbps connectivity. Every plan includes iLO / IPMI out-of-band management, DDoS protection, Full root / Administrator access, Additional IPv4 addresses available and Billed monthly.

PlanCores / ThreadsRAMStorageNetworkPriceGood forBuy
Business
2× Intel Xeon E5-2699 v4 (Mumbai / Delhi)
44 / 88 (2.2 GHz base, 3.6 GHz turbo)128 GB DDR4 ECC1 TB NVMe SSD1 Gbps₹17,999/monthBusiness websites, stores, databases, ERP and many client sitesOrder
Enterprise
2× Intel Xeon Platinum 8269CY (Mumbai / Delhi)
52 / 104 (2.5 GHz base, 3.8 GHz turbo)128 GB DDR4 ECC1 TB NVMe SSD1 Gbps₹19,999/monthVirtualization hosts, large databases, SaaS and container platformsOrder
CustomMore RAM or storage, a second server for failover, or several servers for a cluster: quoted by the team.Clusters, failover pairs, unusual specsAsk

Prices are monthly in INR as listed on the SkyRain Cloud store (verified 2026-11-23). Live stock and final price are shown at checkout.

Instant UPI • ₹649/mo
Fast KVM Cloud Provisioning