Ga naar inhoud

Pakketflow uitleg

Project: SASE Proof of Concept
Datum: 31-05-2026
Component: Stap-voor-stap verkeersanalyse per use case

Dit document beschrijft de exacte weg die een pakket aflegt door de SASE-stack, van client tot internet en terug. Elk scenario correspondeert met een gevalideerd testresultaat elders in de documentatie. Voor het functionele overzichtsschema zie 02-Functioneel-schema; voor de fysieke architectuur zie 01-Architectuur.


Use Case 1 — HTTPS-request via SWG (happy path)

Een gebruiker op Rocky Linux opent https://example.com in Firefox (met handmatige proxy-instelling).

sequenceDiagram
    participant Client as Rocky Linux<br/>(100.116.198.151)
    participant Tunnel as NetBird Tunnel<br/>(wt0 → WireGuard)
    participant OPN as OPNsense<br/>(192.168.50.1)
    participant Squid as Squid Proxy<br/>(:3128 + SSL-bump)
    participant ICAP as School ICAP Guard<br/>(192.168.50.12:13440)
    participant Internet as Internet

    Client->>Tunnel: 1. HTTP CONNECT example.com:443
    Tunnel->>OPN: WireGuard decrypt → LAN
    OPN->>Squid: Verkeer naar poort 3128
    Squid->>Squid: 2. SSL-bump: genereer certificaat<br/>(SECURITYPROJECT_CA)
    Squid->>ICAP: 3. ICAP REQMOD (URL + client-IP)
    ICAP->>ICAP: 4. Lookup users.json<br/>→ user + groep<br/>→ URL-categorie (UT-1)<br/>→ Policy check
    ICAP-->>Squid: 5. Verdict: ALLOW
    Squid->>Internet: 6. TLS-sessie Squid ↔ example.com
    Internet-->>Squid: Response body
    Squid->>ICAP: 7. ICAP RESPMOD (response body)
    ICAP->>ICAP: ClamAV scan + DLP check
    ICAP-->>Squid: Verdict: ALLOW
    Squid-->>Client: Pagina getoond in Firefox

Parallelle inspectie: terwijl het verkeer door OPNsense stroomt, inspecteert Suricata het pakket op netwerkniveau (signature-based IDS). Suricata draait inline op dezelfde VM en ziet al het verkeer dat de firewall passeert.

DNS: de DNS-query voor example.com wordt vooraf opgelost door Unbound DNS (192.168.50.1:53), die het domein toetst aan de geconfigureerde blocklists. Alleen bij een NOERROR-antwoord gaat de browser verder met de HTTPS-verbinding.

Referentie: Squid Configuratie, ICAP Configuratie


Use Case 2 — DNS-blokkering (malware-domein)

Een client vraagt een domein op dat op een Unbound-blocklist staat.

sequenceDiagram
    participant Client as Rocky Linux
    participant Tunnel as NetBird Tunnel (wt0)
    participant DNS as Unbound DNS<br/>(192.168.50.1:53)

    Client->>Tunnel: 1. DNS query: malware-c2.example
    Tunnel->>DNS: Query via overlay → LAN
    DNS->>DNS: 2. Check DNSBL-lijsten:<br/>• Abuse.ch ThreatFox<br/>• hagezi Threat Intel<br/>• OISD Ads/NSFW
    Note over DNS: Match gevonden!
    DNS-->>Client: 3. NXDOMAIN (gesinkholed)
    Note over Client: Browser toont foutmelding<br/>Verkeer bereikt NOOIT<br/>Squid, ICAP of internet

Het verkeer bereikt nooit Squid, ICAP of het internet. De DNS-laag fungeert als eerste verdedigingslinie.

Referentie: Unbound DNS Configuratie, DNS filtering test


Use Case 3 — Malware-download geblokkeerd door ClamAV

Een gebruiker probeert het EICAR-testbestand te downloaden via HTTPS.

sequenceDiagram
    participant Client as Rocky Linux
    participant Squid as Squid<br/>(SSL-bump)
    participant ICAP as ICAP Guard<br/>+ ClamAV
    participant Internet as Internet

    Client->>Squid: 1. GET eicar.org/eicar.com.txt<br/>via proxy :3128
    Squid->>Squid: 2. SSL-bump (TLS ontsleutelen)
    Squid->>Internet: 3. Fetch bestand van origin
    Internet-->>Squid: Response: eicar.com.txt
    Squid->>ICAP: 4. ICAP RESPMOD (response body)
    ICAP->>ICAP: 5. ClamAV scan<br/>→ Detectie: Win.Test.EICAR_HDB-1
    ICAP-->>Squid: 6. Verdict: BLOCK<br/>reden: malware
    Squid-->>Client: 7. Blockpagina
    Note over ICAP: Event gelogd:<br/>user/IP, signature, timestamp

Referentie: Malware inspectie test


Use Case 4 — DLP-blokkering (creditcardnummer upload)

Een gebruiker probeert gevoelige data te uploaden.

sequenceDiagram
    participant Client as Rocky Linux
    participant Squid as Squid<br/>(SSL-bump)
    participant ICAP as ICAP Guard<br/>+ DLP engine
    participant Internet as dlptest.com

    Client->>Squid: 1. POST dlptest.com<br/>body: "4111 1111 1111 1111"<br/>via proxy :3128
    Squid->>Squid: 2. SSL-bump (upload ontsleutelen)
    Squid->>ICAP: 3. ICAP REQMOD (request body)
    ICAP->>ICAP: 4. DLP-engine: creditcard<br/>patroon match (Luhn-validatie)
    ICAP-->>Squid: 5. Verdict: BLOCK<br/>reden: dlp
    Squid-->>Client: 6. DLP-blockpagina
    Note over Internet: Upload bereikt<br/>NOOIT de origin server
    Note over ICAP: Event gelogd:<br/>policy, patroon, user/IP

Referentie: DLP test


Use Case 5 — Identity-based policy blokkering

Een student probeert een geblokkeerde website te bezoeken.

sequenceDiagram
    participant Client as Rocky Linux<br/>(Mariam, students-1e)
    participant Squid as Squid<br/>(SSL-bump)
    participant ICAP as ICAP Guard

    Client->>Squid: 1. GET https://tinder.com<br/>via proxy
    Squid->>ICAP: 2. ICAP REQMOD
    ICAP->>ICAP: 3. Lookup users.json:<br/>100.116.198.151<br/>→ mariam.elhajouti@…<br/>→ groep: students-1e
    ICAP->>ICAP: 4. URL-categorie (UT-1):<br/>tinder.com → "dating"
    ICAP->>ICAP: 5. Policy check:<br/>students-1e + dating = BLOCK
    ICAP-->>Squid: Verdict: BLOCK
    Squid-->>Client: Blockpagina
    Note over ICAP: Event gelogd: user, groep,<br/>policy, domein, action, reason

Dezelfde URL met een IT-Helpdesk-account zou een ander verdict kunnen opleveren, afhankelijk van de groepspolicy. De beslissing is volledig identity-driven.

Referentie: Identity-based access test


Use Case 6 — ZTNA route-distributie (student vs. IT-Helpdesk)

De ZTNA-laag bepaalt welke netwerksegmenten een peer kan bereiken.

flowchart TD
    subgraph Student["Student-peer (students-1e)"]
        S1[netbird networks list]
        S2[Alleen 0.0.0.0/0 exit-node]
        S3[ping 192.168.50.12]
        S4[Pakket via exit-route<br/>naar OPNsense]
        S5[OPNsense firewall:<br/>bron 100.116.0.0/16 naar<br/>192.168.50.0/24 → DROP]
        S6[❌ Verbinding geweigerd]
    end

    subgraph Helpdesk["IT-Helpdesk-peer (IT-HELPDESK-1e)"]
        H1[netbird networks list]
        H2[0.0.0.0/0 + 192.168.50.12/32<br/>+ 192.168.50.0/24]
        H3[ping 192.168.50.12]
        H4[Pakket via /32 route<br/>naar OPNsense]
        H5[OPNsense firewall:<br/>IT-HELPDESK-1e → ALLOW]
        H6[✅ Verbinding geslaagd]
    end

    S1 --> S2 --> S3 --> S4 --> S5 --> S6
    H1 --> H2 --> H3 --> H4 --> H5 --> H6

    style S6 fill:#dc262633,stroke:#dc2626
    style H6 fill:#16a34a33,stroke:#16a34a

De segmentatie wordt op twee lagen afgedwongen: NetBird distribueert routes alleen aan geautoriseerde groepen, en OPNsense blokkeert verkeer van ongeautoriseerde bron-IP's als defense-in-depth.

Referentie: Per-applicatie toegang, ZTNA Configuratie sectie 11.2


Use Case 7 — Out-of-band NDR (Zeek + RITA)

Zeek ontvangt een kopie van al het LAN-verkeer en analyseert het passief.

flowchart LR
    subgraph VM1["VM1 — OPNsense"]
        LAN["vtnet1 (LAN)<br/>192.168.50.1"]
        MIR["vtnet2 (OPT1)<br/>Mirror-out, geen IP"]
    end

    subgraph VMBR2["vmbr2 — Mirror bridge"]
        SPAN["L2 kopie<br/>(passief)"]
    end

    subgraph VM3["VM3 — NDR Sensor"]
        SNIFF["eth1 (sniff)<br/>geen IP, promiscuous"]
        Zeek["Zeek<br/>conn.log, dns.log,<br/>http.log, ssl.log"]
        RITA["RITA<br/>Beacon-detectie"]
    end

    subgraph VM4["VM4 — SIEM"]
        Wazuh["Wazuh<br/>Alerts dashboard"]
    end

    LAN -->|tc mirror| MIR
    MIR --> SPAN
    SPAN --> SNIFF
    SNIFF --> Zeek
    Zeek --> RITA
    RITA -.->|alerts| Wazuh

    style VM3 fill:#9333ea15,stroke:#9333ea
    style VM4 fill:#ca8a0415,stroke:#ca8a04

Dit pad is volledig out-of-band: Zeek ziet het verkeer maar beïnvloedt het niet. Een eventuele storing in Zeek heeft geen impact op de productieconnectiviteit.

Referentie: Zeek + RITA Configuratie


Use Case 8 — Suricata IDS alert

Suricata draait inline op OPNsense en inspecteert al het verkeer dat de firewall passeert.

sequenceDiagram
    participant Client as Rocky Linux
    participant FW as OPNsense Firewall
    participant IDS as Suricata IDS<br/>(zelfde VM1)
    participant SIEM as Wazuh (VM4)
    participant Internet as Internet

    Client->>FW: 1. Verkeer LAN → WAN
    FW->>IDS: Inline packet inspection
    IDS->>IDS: 2. Toets aan ET Open rulesets:<br/>• Exploits<br/>• C2 communicatie<br/>• Port scans<br/>• Protocol anomalieën
    alt Match gevonden
        IDS->>SIEM: 3. Alert → eve.json<br/>→ Wazuh-agent forwardt
        Note over SIEM: Alert zichtbaar<br/>in dashboard
    end
    IDS-->>FW: Pakket doorgeven (IDS-modus)
    FW->>Internet: Verkeer naar internet

Suricata opereert in IDS-modus (detectie, geen blokkering). De alerts dienen als input voor het SIEM-dashboard en complementeren de preventieve blokkering door Squid/ICAP en Unbound DNS.

Referentie: Suricata Configuratie, IDS Suricata test


Samenvatting: inspectielagen

Elk pakket kan door meerdere inspectielagen passeren:

flowchart TD
    DNS["1. DNS — Unbound<br/>Domein-blokkering via blocklists"]
    ZTNA["2. ZTNA — NetBird + OPNsense FW<br/>Route-distributie + firewall"]
    PROXY["3. Proxy — Squid<br/>SSL-bump + forwarding"]
    CONTENT["4. Content — ICAP Guard<br/>Identity-policy, URL-cat, DLP, ClamAV"]
    IDS["5. IDS — Suricata<br/>Signature-based detectie"]
    NDR["6. NDR — Zeek + RITA<br/>Passieve beacon-detectie"]
    SIEM["7. SIEM — Wazuh<br/>Correlatie + alerting"]

    DNS -->|NOERROR| ZTNA
    DNS -->|NXDOMAIN| STOP1[🛑 Gestopt]
    ZTNA -->|Route + FW OK| PROXY
    ZTNA -->|Geen route / DROP| STOP2[🛑 Gestopt]
    PROXY --> CONTENT
    CONTENT -->|ALLOW| IDS
    CONTENT -->|BLOCK| STOP3[🛑 Gestopt]
    IDS -->|Alert + doorlaten| NDR
    NDR -.-> SIEM

    style STOP1 fill:#dc262633,stroke:#dc2626
    style STOP2 fill:#dc262633,stroke:#dc2626
    style STOP3 fill:#dc262633,stroke:#dc2626
    style DNS fill:#0284c733,stroke:#0284c7
    style ZTNA fill:#16a34a33,stroke:#16a34a
    style PROXY fill:#ea580c33,stroke:#ea580c
    style CONTENT fill:#0d948833,stroke:#0d9488
    style IDS fill:#dc262633,stroke:#dc2626
    style NDR fill:#9333ea33,stroke:#9333ea
    style SIEM fill:#ca8a0433,stroke:#ca8a04
Volgorde Laag Component Actie Inline/Out-of-band
1 DNS Unbound DNS Domein-blokkering via blocklists Inline
2 ZTNA NetBird + OPNsense FW Route-distributie + firewall-filtering Inline
3 Proxy Squid SSL-bump, request/response forwarding Inline
4 Content School ICAP Guard Identity-policy, URL-cat, DLP, ClamAV Inline (via ICAP)
5 IDS Suricata Signature-based detectie Inline (IDS-modus)
6 NDR Zeek + RITA Passieve metadata-analyse, beacon-detectie Out-of-band
7 SIEM Wazuh Correlatie en alerting over alle bronnen Out-of-band

Niet elk pakket passeert alle lagen. DNS-blokkering stopt het verkeer vóór de proxy; een DLP-blokkering stopt het bij ICAP vóór de origin server. De inspectie is defense-in-depth: als één laag een bedreiging mist, kan een volgende laag het alsnog detecteren.