**Section 1 — Introduction What Is This Project and Why Does It Matter? Imagine you run a website that thousands of people use every day. One afternoon, an attacker decides to flood your server with millions of fake requests, slowing it down for everyone else. This is called a DDoS attack — Distributed Denial of Service. At HNG, I was given the task of building a tool that watches all incoming traffic to a Nextcloud server in real time, learns what normal traffic looks like, and automatically blocks attackers the moment something looks suspicious. No third party tools. No shortcuts. Just Python, Linux, and logic. Here is how I built it. **Section 2 — The sliding window How the Sliding Window Works The first problem I had to solve was: how do I track how many requests are arriving right now? The answer is a sliding window — a data structure that always shows you the last 60 seconds of traffic, no matter when you look. I used Python's deque (double-ended queue) to build it.…