Skill

Configure Robust DDoS Protection Systems

AI skill for DDoS protection configuration - iptables/sysctl hardening, Nginx/ModSecurity rate limiting, and layered defense.

Works with iptablesnginxcloudflareaws shieldprometheus

78
Spark score
out of 100
Updated 7 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Automate the configuration and hardening of network infrastructure against Distributed Denial of Service (DDoS) attacks. This asset provides expert guidance and code snippets for implementing layered defense strategies across network, application, and cloud layers.

Outcomes

What it gets done

01

Configure iptables for network-level filtering and rate limiting.

02

Implement sysctl settings for kernel-level DDoS resilience.

03

Set up Nginx and Apache ModSecurity for application-layer attack mitigation.

04

Integrate cloud-based DDoS protection services like Cloudflare and AWS Shield.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-ddos-protection-config | bash

Overview

DDoS Protection Configuration Expert Agent

Configures layered DDoS protection - iptables/sysctl network hardening and Nginx/ModSecurity application-layer rate limiting. Use when configuring DDoS defense for an internet-facing production system exposed to attack traffic.

What it does

This skill provides expertise in designing and configuring comprehensive DDoS protection across multiple layers of network infrastructure, with deep knowledge of attack vectors, mitigation strategies, rate limiting, traffic analysis, and configuring various DDoS protection tools and services. Core defense-in-depth principles cover Layer 3/4 protection (network and transport layer filtering), Layer 7 protection (application-layer analysis and filtering), edge protection (CDN and network-edge mitigation), infrastructure hardening (server and application resilience), and real-time traffic monitoring/anomaly detection. Attack classification distinguishes volumetric attacks (UDP floods, ICMP floods, amplification attacks), protocol attacks (SYN floods, fragmented packet attacks, Ping of Death), application-layer attacks (HTTP floods, Slowloris, RUDY), and reflection/amplification attacks (DNS, NTP, SSDP, Memcached amplification).

Network-layer DDoS protection covers a comprehensive iptables rule set - dropping invalid packets and non-SYN new connections, blocking bogus TCP flag combinations, rate-limiting new TCP connections globally and per source IP (via the recent module), and limiting UDP/ICMP flood rates - plus sysctl-based network hardening (SYN flood protection via syncookies and backlog tuning, reduced TIME_WAIT socket duration, increased netdev budget for high packet rates, TCP buffer tuning, and reverse-path filtering).

Application-layer DDoS protection covers Nginx rate limiting configuration - separate rate-limit zones for login/API/general traffic, connection limiting per IP and per server, request size and timeout limits, and endpoint-specific rate limits (stricter for /login, moderate for /api/) returning HTTP 429 on limit breach - and Apache ModSecurity custom rules detecting POST flood patterns (counting POST requests per IP and blocking for a cooldown period once a threshold is exceeded) and slow-attack protection (rejecting oversized request bodies that could indicate a slow POST attack).

When to use - and when NOT to

Use this skill when configuring layered DDoS protection - network-level iptables/sysctl hardening plus application-level rate limiting via Nginx or ModSecurity - for a production system exposed to potential attack traffic. It is well suited to internet-facing services needing defense against volumetric, protocol, and application-layer attacks. It is not meant for internal-only services with no internet exposure, or as a substitute for a dedicated cloud/CDN DDoS mitigation service for very large-scale volumetric attacks.

Inputs and outputs

Input: the exposed service's network topology, expected traffic patterns, and the attack vectors to defend against.

Output: iptables/sysctl network hardening rules and Nginx/ModSecurity application-layer rate limiting configuration. Example Nginx rate limiting zones:

limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;

location /login {
    limit_req zone=login burst=5 nodelay;
    limit_req_status 429;
}

Integrations

Configures iptables, Linux sysctl network parameters, Nginx rate limiting, and Apache ModSecurity rules; layers alongside cloud/CDN DDoS mitigation services for edge protection.

Who it's for

Infrastructure and security engineers configuring layered DDoS protection for internet-facing services, and teams that need both network-level and application-level rate limiting rather than relying on a single defense layer.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.