# mitigra/antiddos architecture

> Architecture diagram of the GitHub repository mitigra/antiddos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mitigra/antiddos
- Repository: https://github.com/mitigra/antiddos

## Overview

antiddos is a root-run Bash CLI for managing Linux firewall protections through iptables. The user invokes commands to apply or remove protections, inspect status, monitor traffic, manage IP lists, and persist rules. The README documents these capabilities but no source excerpts were provided, so the graph shows only those documented relationships; the script’s internal dispatch and implementation details remain unknown.

Main entry points: [`antiddos.sh`](https://github.com/mitigra/antiddos/blob/main/antiddos.sh) (Command interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firewall_tool["Firewall tool"]
  node_cli["Command interface<br/>[antiddos.sh]"]
  node_protection["Flood protection<br/>[antiddos.sh]"]
  node_ip_management["IP lists<br/>[antiddos.sh]"]
  node_status["Rule status<br/>[antiddos.sh]"]
  node_monitoring["Live monitoring<br/>[antiddos.sh]"]
  node_persistence["Rule persistence<br/>[antiddos.sh]"]
end

node_administrator(("Administrator"))
node_iptables["iptables"]
node_monitor_tools["ss or netstat"]
node_persistent_service["iptables-persistent"]

node_administrator -->|"runs commands"| node_cli
node_cli -->|"starts or stops"| node_protection
node_protection -->|"manages rules"| node_iptables
node_cli -->|"manages IPs"| node_ip_management
node_ip_management -->|"manages rules"| node_iptables
node_cli -->|"requests status"| node_status
node_status -->|"views rules"| node_iptables
node_cli -->|"launches dashboard"| node_monitoring
node_monitoring -.->|"uses for monitoring"| node_monitor_tools
node_cli -->|"saves rules"| node_persistence
node_persistence -->|"persists rules"| node_iptables
node_persistence -.->|"requires optionally"| node_persistent_service

click node_cli "https://github.com/mitigra/antiddos/blob/main/antiddos.sh"
click node_protection "https://github.com/mitigra/antiddos/blob/main/antiddos.sh"
click node_ip_management "https://github.com/mitigra/antiddos/blob/main/antiddos.sh"
click node_status "https://github.com/mitigra/antiddos/blob/main/antiddos.sh"
click node_monitoring "https://github.com/mitigra/antiddos/blob/main/antiddos.sh"
click node_persistence "https://github.com/mitigra/antiddos/blob/main/antiddos.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_protection,node_ip_management,node_status,node_monitoring,node_persistence toneBlue
class node_administrator,node_iptables,node_monitor_tools,node_persistent_service toneIndigo
```

## Components

### Firewall tool

- [Command interface](https://github.com/mitigra/antiddos/blob/main/antiddos.sh): `antiddos.sh`
- [Flood protection](https://github.com/mitigra/antiddos/blob/main/antiddos.sh): `antiddos.sh`
- [IP lists](https://github.com/mitigra/antiddos/blob/main/antiddos.sh): `antiddos.sh`
- [Rule status](https://github.com/mitigra/antiddos/blob/main/antiddos.sh): `antiddos.sh`
- [Live monitoring](https://github.com/mitigra/antiddos/blob/main/antiddos.sh): `antiddos.sh`
- [Rule persistence](https://github.com/mitigra/antiddos/blob/main/antiddos.sh): `antiddos.sh`

### Other components

- **Administrator**
- **iptables**
- **ss or netstat**
- **iptables-persistent**

## Connections

- Administrator → Command interface: runs commands (evidence: `README.md`)
- Command interface → Flood protection: starts or stops (evidence: `README.md`)
- Flood protection → iptables: manages rules (evidence: `README.md`)
- Command interface → IP lists: manages IPs (evidence: `README.md`)
- IP lists → iptables: manages rules (evidence: `README.md`)
- Command interface → Rule status: requests status (evidence: `README.md`)
- Rule status → iptables: views rules (evidence: `README.md`)
- Command interface → Live monitoring: launches dashboard (evidence: `README.md`)
- Live monitoring → ss or netstat: uses for monitoring (evidence: `README.md`)
- Command interface → Rule persistence: saves rules (evidence: `README.md`)
- Rule persistence → iptables: persists rules (evidence: `README.md`)
- Rule persistence → iptables-persistent: requires optionally (evidence: `README.md`)
