# wbatchayon/network-security architecture

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

- Interactive diagram: https://gitdiagram.com/wbatchayon/network-security
- Repository: https://github.com/wbatchayon/network-security

## Overview

This repository describes a containerized network-security setup. An operator installs host Fail2ban, then starts the services with Docker Compose; users can then access the VPN, bastion, WAF, and honeypot. The documented security capabilities also include network segmentation. The README identifies the relevant configuration files and service roles, but no source excerpts were provided, so relationships below rely only on those README statements.

Main entry points: [`docker-compose.yml`](https://github.com/wbatchayon/network-security/blob/main/docker-compose.yml) (Service stack), [`scripts/setup-fail2ban.sh`](https://github.com/wbatchayon/network-security/blob/main/scripts/setup-fail2ban.sh) (Fail2ban setup), [`configs/openvpn/ovpn.conf`](https://github.com/wbatchayon/network-security/blob/main/configs/openvpn/ovpn.conf) (VPN), [`configs/modsecurity/modsecurity.conf`](https://github.com/wbatchayon/network-security/blob/main/configs/modsecurity/modsecurity.conf) (WAF)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Service setup"]
  node_compose["Service stack<br/>[docker-compose.yml]"]
  node_setup["Fail2ban setup<br/>[setup-fail2ban.sh]"]
end

subgraph group_access["Network access"]
  node_vpn["VPN<br/>[ovpn.conf]"]
  node_bastion["Bastion<br/>[docker-compose.yml]"]
end

subgraph group_defense["Threat defenses"]
  node_waf["WAF<br/>[modsecurity.conf]"]
  node_honeypot["Honeypot<br/>[cowrie.cfg]"]
  node_fail2ban["Fail2ban<br/>[jail.local]"]
end

subgraph group_segmentation["Network boundaries"]
  node_segmentation["Network segmentation"]
end

node_operator(("Operator"))
node_users(("Service users"))

node_operator -->|"runs setup"| node_setup
node_operator -->|"starts services"| node_compose
node_setup -->|"installs"| node_fail2ban
node_compose -->|"configures service"| node_vpn
node_compose -->|"starts service"| node_bastion
node_compose -->|"configures service"| node_waf
node_compose -->|"configures service"| node_honeypot
node_users -->|"accesses"| node_vpn
node_users -->|"accesses"| node_bastion
node_users -->|"accesses"| node_waf
node_users -->|"accesses"| node_honeypot

click node_compose "https://github.com/wbatchayon/network-security/blob/main/docker-compose.yml"
click node_setup "https://github.com/wbatchayon/network-security/blob/main/scripts/setup-fail2ban.sh"
click node_vpn "https://github.com/wbatchayon/network-security/blob/main/configs/openvpn/ovpn.conf"
click node_bastion "https://github.com/wbatchayon/network-security/blob/main/docker-compose.yml"
click node_waf "https://github.com/wbatchayon/network-security/blob/main/configs/modsecurity/modsecurity.conf"
click node_honeypot "https://github.com/wbatchayon/network-security/blob/main/configs/cowrie/cowrie.cfg"
click node_fail2ban "https://github.com/wbatchayon/network-security/blob/main/configs/fail2ban/jail.local"
click node_segmentation "https://github.com/wbatchayon/network-security/blob/main/docs/network-segmentation.md"

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_compose,node_setup,node_users toneBlue
class node_vpn,node_bastion toneAmber
class node_waf,node_honeypot,node_fail2ban toneMint
class node_segmentation toneRose
class node_operator toneIndigo
```

## Components

### Service setup

- [Service stack](https://github.com/wbatchayon/network-security/blob/main/docker-compose.yml): `docker-compose.yml`
- [Fail2ban setup](https://github.com/wbatchayon/network-security/blob/main/scripts/setup-fail2ban.sh): `scripts/setup-fail2ban.sh`

### Network access

- [VPN](https://github.com/wbatchayon/network-security/blob/main/configs/openvpn/ovpn.conf): `configs/openvpn/ovpn.conf`
- [Bastion](https://github.com/wbatchayon/network-security/blob/main/docker-compose.yml): `docker-compose.yml`

### Threat defenses

- [WAF](https://github.com/wbatchayon/network-security/blob/main/configs/modsecurity/modsecurity.conf): `configs/modsecurity/modsecurity.conf`
- [Honeypot](https://github.com/wbatchayon/network-security/blob/main/configs/cowrie/cowrie.cfg): `configs/cowrie/cowrie.cfg`
- [Fail2ban](https://github.com/wbatchayon/network-security/blob/main/configs/fail2ban/jail.local): `configs/fail2ban/jail.local`

### Network boundaries

- [Network segmentation](https://github.com/wbatchayon/network-security/blob/main/docs/network-segmentation.md): `docs/network-segmentation.md`

### Other components

- **Operator**
- **Service users**

## Connections

- Operator → Fail2ban setup: runs setup (evidence: `README.md`)
- Operator → Service stack: starts services (evidence: `README.md`)
- Fail2ban setup → Fail2ban: installs (evidence: `README.md`)
- Service stack → VPN: configures service (evidence: `README.md`)
- Service stack → Bastion: starts service (evidence: `README.md`)
- Service stack → WAF: configures service (evidence: `README.md`)
- Service stack → Honeypot: configures service (evidence: `README.md`)
- Service users → VPN: accesses (evidence: `README.md`)
- Service users → Bastion: accesses (evidence: `README.md`)
- Service users → WAF: accesses (evidence: `README.md`)
- Service users → Honeypot: accesses (evidence: `README.md`)
