A distributed denial-of-service (DDoS) attack happens when attackers flood a server with malicious internet traffic. The goal is simple: take your website offline and block real visitors from reaching your services. Instead of attacking from a single computer, the attacker uses thousands of compromised devices worldwide to strike all at once.
For any online business, downtime means lost sales, damaged customer trust, and dropped search rankings. Large traffic spikes can quickly exhaust server RAM, crash databases, or knock entire networks offline. Understanding how these attacks work is the first step to keeping your systems online. For organizations scaling high-throughput compute workloads, our scalable Linux VPS hosting solutions provides dedicated unmetered performance and enterprise hardware isolation.
A Distributed Denial of Service (DDoS) attack overwhelms targeted servers, networks, or applications with high-volume malicious traffic floods, rendering online services unavailable to legitimate users. Mitigating modern multi-vector attacks requires combining upstream BGP scrubbing filters, automated Layer 3/4 SYN/UDP mitigation, and Web Application Firewalls (WAF) for Layer 7 HTTP flood inspection.
- Attack Vectors: Encompasses volumetric floods (UDP reflection), protocol attacks (SYN floods), and application-layer exhaustion (HTTP POST floods).
- Upstream BGP Scrubbing: Diverts inbound traffic spikes through high-capacity scrubbing centers, dropping malicious packets before reaching host hardware.
- Web Application Firewalls: Inspects Layer 7 payloads to block rate-abuse, credential stuffing, and botnet scrapers in real time.
- Infrastructure Redundancy: Multi-homed Tier-1 uplinks and unmetered transit capacity prevent bandwidth saturation during coordinated attacks.
In modern digital operations, server uptime and service reliability directly determine business reputation and revenue. Distributed Denial of Service (DDoS) attacks have grown in sophistication, volume, and frequency, targeting everything from eCommerce storefronts to corporate database backends. Understanding the anatomy of DDoS attack vectors and deploying layered defensive infrastructure ensures your web properties remain responsive, resilient, and protected against downtime.
A distributed attack (DDoS) is much harder to stop. Attackers build networks of infected devices called botnets. These include hacked servers, infected home routers, and unpatched smart office gadgets. An attacker controls all these devices remotely through a Command and Control (C2) server.
Modern botnets operate through four distinct operational stages:
Automated scripts scan public IP ranges for exposed services running unpatched firmware or default credentials.
Attackers upload lightweight botnet malware, quietly recruiting devices without alerting the owner.
Compromised devices establish outbound heartbeat links to a central C2 server, awaiting attack commands.
On command, thousands of botnet nodes transmit synchronized floods toward the targeted server simultaneously.
Manual IP blocking does not work against botnets. The attack traffic arrives from thousands of clean residential networks across dozens of countries. If you block one IP address, hundreds of others keep sending traffic.
Attackers also use UDP amplification to make small attacks massive. They send fake requests to public DNS or NTP servers using your server’s IP address. These third-party servers reply directly to your server. Because UDP does not verify sender addresses, the replies are often 20 to 50 times larger than the original request, creating a massive flood with very little effort.
The Three Primary Categories of DDoS Attacks
DDoS attacks are not all the same. Security teams divide attacks into three main categories based on the network layer they target.
Saturates physical bandwidth pipes. Measured in Gbps. Examples: UDP floods, ICMP pings, and DNS reflection.
Exhausts connection state tables. Measured in PPS. Examples: TCP SYN floods, ACK floods, and malformed packets.
Overwhelms web server processes. Measured in RPS. Examples: HTTP GET/POST storms, API abuse, and Slowloris.
1. Volumetric Attacks (Layers 3 and 4)
Volumetric attacks try to clog your server’s internet pipe. The attacker sends massive waves of data packets until switches and network cards drop traffic from overload.
Common examples include UDP floods, ICMP ping floods, and DNS reflection. Your server might have plenty of free CPU and memory, but legitimate users cannot reach it because the network connection is full. These attacks are measured in gigabits per second (Gbps) and must be stopped upstream by your hosting provider.
2. Protocol and State-Exhaustion Attacks (Layers 3 and 4)
Protocol attacks target the connection tables inside firewalls and operating systems. Every open connection on a server takes up a tiny slice of memory.
The TCP SYN flood is the most common example. During a normal connection, client and server complete a three-way handshake: SYN, SYN-ACK, and ACK. In a SYN flood, the attacker sends thousands of SYN packets and never sends the final ACK back.
Your server reserves memory for each unfinished connection while waiting for a timeout. Within seconds, the connection queue fills up completely. The server then rejects new connection attempts from real users. Protocol attacks are measured in packets per second (PPS). To achieve balanced multi-instance agility and cost efficiency, pair your deployment with enterprise dedicated server infrastructure featuring high-speed NVMe storage arrays.
3. Application Layer Attacks (Layer 7)
Application-layer attacks target the web server software, such as Nginx, Apache, or database services. Instead of flooding network pipes, the attacker sends requests that look like normal user browsing.
These requests complete a valid TCP handshake, making them hard for standard network firewalls to catch. Attackers often target heavy web pages, database search bars, or shopping checkout scripts. A Slowloris attack sends HTTP headers very slowly, holding server workers open until the web server runs out of connections. Application attacks are measured in requests per second (RPS).
Here is how the three categories compare side by side:
| Attack Category | Network Layer | Common Attack Types | Measured In | Best Defense Method |
|---|---|---|---|---|
| Volumetric | Layer 3 & 4 | UDP floods, ICMP floods, DNS amplification | Gbps / Tbps | Upstream Anycast scrubbing networks |
| Protocol / State | Layer 3 & 4 | TCP SYN floods, ACK floods, fragmented packets | Packets/sec (PPS) | Kernel SYN cookies and queue tuning |
| Application Layer | Layer 7 | HTTP GET/POST floods, Slowloris, API abuse | Requests/sec (RPS) | Web Application Firewalls & rate limits |
Core Architecture for DDoS Prevention
No single setting can stop every type of attack. A local server cannot survive a 100 Gbps flood alone. At the same time, an edge proxy cannot protect your server if an attacker targets your origin IP address directly. Good security relies on multiple layers of protection.
1. Upstream Anycast BGP Routing and Scrubbing Centers
When an attack exceeds your physical port speed, traffic must be cleaned before it reaches your datacenter. Anycast BGP routing announces the same server IP address across dozens of global facilities. Incoming traffic automatically routes to the closest physical facility, spreading the attack volume across a global network.
Inside these scrubbing centers, specialized hardware strips away malicious packets and reflection floods. Only verified, clean traffic travels down private fiber links to your origin server. For mission-critical sites, OnliveInfotech deploys DDoS protected dedicated servers backed by high-capacity scrubbing links that filter bad traffic before it ever touches your server interface.
2. Reverse Proxies and Origin IP Cloaking
A Content Delivery Network (CDN) or reverse proxy sits in front of your web application. The proxy terminates client connections, serves cached static files, and blocks common HTTP exploits.
Edge proxies only work if your real origin IP address stays secret. If attackers find your server’s direct IP, they can bypass the proxy completely. Never share your origin IP address in public DNS records or outgoing emails. Configure your local firewall to block all traffic on ports 80 and 443 that does not come from your proxy provider’s IP range.
Host-Level Hardening: Linux Kernel Network Tuning
Upstream scrubbing stops massive volumetric attacks, but your Linux operating system must still handle smaller connection floods. Default Linux network settings prioritize speed over security. You can adjust key values in /etc/sysctl.conf to make your server much more resilient.
During a SYN flood, connection queues fill quickly. Enabling TCP SYN cookies prevents this problem. Instead of holding memory for pending handshakes, the kernel stores connection details inside the SYN-ACK packet sequence number. Memory is only allocated when the client sends back a valid ACK response.
Add these lines to your /etc/sysctl.conf file:
- Configuration:
net.ipv4.tcp_syncookies = 1 - Configuration:
net.ipv4.tcp_max_syn_backlog = 4096 - Configuration:
net.ipv4.tcp_synack_retries = 2 - Configuration:
net.netfilter.nf_conntrack_max = 262144
Apply your changes immediately without restarting the server:
- Configuration:
sudo sysctl -p
Lowering tcp_synack_retries to 2 tells the kernel to drop abandoned connections much faster, saving socket memory. Raising nf_conntrack_max prevents your firewall from dropping real connections during sudden traffic surges.
Web Server Defenses: Nginx Rate Limiting and Timeouts
Layer 7 HTTP attacks must be filtered directly inside your web server configuration. Because these requests look like real traffic, kernel firewalls allow them through. Nginx can inspect request frequencies and slow down aggressive clients.
Nginx uses shared memory zones to track how many requests arrive from each IP address. If an IP sends too many requests, Nginx returns an HTTP 503 error.
Add this configuration to the http block in /etc/nginx/nginx.conf:
The burst=25 nodelay parameter allows legitimate users to load multiple images and styles at once without delay, while blocking sustained flood scripts. Shortening client timeouts to 10 seconds stops Slowloris attacks by closing connections that take too long to send data. Combine these rules with broader server security, such as protecting your website from unauthorized access, to keep admin dashboards and login forms secure.
Operational Best Practices and Incident Response
When an attack strikes, a calm, organized response saves valuable time. Good incident management requires clear traffic visibility and avoiding rushed mistakes.
Before blocking traffic, check whether high server load comes from an attack or a real surge in visitors. Run this command to see which IP addresses have the most active connections:
- Configuration:
ss -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head -n 15
If hundreds of connections come from just a few IP addresses, an automated script is likely running. If traffic is spread evenly across many countries with normal browsing patterns, add more server resources rather than blocking IPs.
During an active attack, avoid these common operational mistakes:
ipset or edge rules instead.
Conclusion: Securing Your Infrastructure Against DDoS Attacks
DDoS attacks remain a serious threat to online services. Because attackers can target network bandwidth, kernel connection tables, or application scripts, no single tool stops every attack.
The best defense combines multiple protective layers. Use upstream Anycast scrubbing to absorb massive volumetric floods. Put reverse proxies in place to filter malicious web requests. Finally, tune your Linux kernel and web server to prevent resource exhaustion. Setting up these defenses now ensures your website stays fast, secure, and open to legitimate customers around the clock. For streamlined domain management and server configuration across multi-tenant environments, refer to our comprehensive Plesk vs cPanel hosting control panel guide.