Your site suddenly won't load, your server isn't responding and the traffic graph has gone through the roof: most likely you're facing a DDoS attack. In this guide we explain what a DDoS attack is, its types and symptoms, and the ways to protect your website or server against these attacks.
What is a DDoS attack?
DDoS (Distributed Denial of Service) means overwhelming a server, website or network with fake traffic from a large number of sources so that real users can no longer reach it. Attacks are usually carried out through botnets made up of thousands of compromised devices (computers, IoT devices, servers).
The goal of DDoS is not to steal data but to take a service down. Attacks may be motivated by competitive pressure, extortion (ransom), revenge, or the desire to hide another attack. Game servers, e-commerce sites and hosting infrastructure are among the most frequent targets.
Types of DDoS attacks
1. Volumetric attacks (Layer 3/4)
The aim is to completely saturate the target's internet connection. Traffic is generated at gigabits, or even terabits, per second.
- UDP Flood: Large numbers of UDP packets are sent to random ports.
- Reflection/amplification: Small queries are sent to open services such as DNS, NTP or Memcached; these services return much larger responses to the victim's IP address.
2. Protocol attacks
These aim to exhaust the connection tables of the server or network devices.
- SYN Flood: TCP connection requests (SYN) are sent but the connection is never completed; the server fills up with half-open connections.
- ACK/RST Flood and fragmented packet attacks.
3. Application-layer attacks (Layer 7)
These wear down the web application with HTTP requests that look like genuine user requests. Even if the traffic volume is low, server resources are quickly exhausted because every request requires database queries and PHP processing.
- HTTP GET/POST Flood: Intense requests to heavy pages such as search, cart or login pages.
- Slowloris: Keeps connections open by sending data very slowly, filling up the server's connection limit.
| Type | Target | Where is it stopped? |
|---|---|---|
| Volumetric (L3/L4) | Bandwidth | At the network level, before reaching the server |
| Protocol | Connection tables | Network devices and DDoS filters |
| Application (L7) | CPU, RAM, database | WAF, CDN, server configuration |
Signs of a DDoS attack
- The site suddenly becomes very slow or completely unreachable.
- Unexplained sudden spikes in network traffic graphs.
- Server CPU or connection count rising far above normal.
- Heavy requests in the logs to the same page, with the same browser signature or from specific countries.
- Even connecting to the server via SSH becomes difficult.
To see current connections on the server:
# Connection counts by state
ss -s
# IP addresses with the most open connections
ss -ntu | awk 'NR>1 {print $6}' | cut -d: -f1 | sort | uniq -c | sort -nr | headWays to protect against DDoS
1. Network-level DDoS protection (the most important)
Volumetric attacks cannot be stopped by any software on your server, because they saturate the connection before reaching the server. These attacks must be filtered by network-level protection systems that clean (scrub) the traffic. This is why, when choosing hosting or a server, whether the provider offers DDoS protection is one of the most critical criteria.
MerkezHost's infrastructure is protected by layered Corero + Stormwall DDoS protection. Attack traffic is filtered before it reaches your server.
2. Using a CDN and WAF
A CDN such as Cloudflare hides your server's real IP address and filters application-layer attacks on its own network. A Web Application Firewall (WAF) blocks suspicious request patterns. For setup, see our Cloudflare guide.
When using a CDN, clean up old DNS records that reveal your server's real IP address (e.g. a subdomain that points directly to the server). If an attacker finds the real IP, they can bypass the CDN and attack the server directly.
3. Server-level hardening
- Leave only the necessary ports open: UFW and Fail2Ban guide.
- On Linux, make sure SYN cookie protection is enabled:
sysctl net.ipv4.tcp_syncookies(the value should be 1). - Use request limiting (
limit_req) and connection limiting (limit_conn) in Nginx. - Cache heavy pages; a page served from cache puts far less load on the server during an attack.
A simple request limiting example for Nginx:
# In the http block
limit_req_zone $binary_remote_addr zone=genel:10m rate=10r/s;
# In the server or location block
limit_req zone=genel burst=20 nodelay;4. Be prepared
- Know your normal traffic level; only then can you notice anomalies.
- Set up server monitoring (CPU, bandwidth, connection count) and alerting.
- Know whom to contact during an attack: note down your provider's 24/7 support channel.
What should you do if you're under attack?
- Check the logs to determine whether the problem is an attack, a software bug or a genuine increase in traffic.
- Inform your hosting or server provider's support team immediately.
- If you use Cloudflare, temporarily enable Under Attack Mode.
- If the attacking IP ranges or specific request patterns are clear, add firewall rules.
- After the attack ends, review the logs and apply permanent measures.
Don't pay in response to emails saying "we'll attack your site if you don't pay". Paying does not guarantee the attack will stop and makes you a target again.
Conclusion
The most effective protection against DDoS attacks is a combination of network-level filtering, WAF/CDN at the application layer and correct configuration at the server level. Take a look at our VDS, performance and dedicated servers, which come with layered DDoS protection as standard.
Frequently Asked Questions
Does a DDoS attack steal my data?
The aim of a DDoS attack is not to steal data but to make a service unreachable. However, it can sometimes be used as a smokescreen to hide other attacks.
If my server has a firewall, am I protected against DDoS?
Partially. A firewall on the server can mitigate application-layer attacks, but volumetric attacks that saturate the connection must be filtered at the network level before they reach the server.
Which DDoS protection does MerkezHost use?
Our infrastructure is protected by layered Corero + Stormwall DDoS protection.
