# syedhnaqvi/pfsense architecture

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

- Interactive diagram: https://gitdiagram.com/syedhnaqvi/pfsense
- Repository: https://github.com/syedhnaqvi/pfsense

## Overview

##### Project type and purpose
- This is a hands-on lab/tutorial showing how to deploy a pfSense firewall in a virtual environment (Oracle VirtualBox or VMware), configure multiple virtual network interfaces (WAN, LAN, DMZ), and connect a client VM to the LAN segment.
- It is not an application codebase but a deployment guide whose “architecture” is a segmented network.

##### File structure & README
- The README defines three network interfaces on the pfSense VM and a second VM (Ubuntu/Windows) on the LAN segment.

##### Main components
a. Hypervisor host (Oracle VirtualBox or VMware)
b. pfSense VM
- Network interface Adapter-1 → WAN (bridged or NAT to the internet)
- Adapter-2 → LAN internal network
- Adapter-3 → DMZ internal network
c. Client VM (Ubuntu/Windows) attached to the LAN network
d. External Internet (represented as a cloud)

##### Relationships and data flows
- Traffic from the Internet cloud enters Adapter-1 on the pfSense VM (WAN).
- pfSense enforces firewall rules to permit/deny/route traffic between WAN, LAN, and DMZ segments.
- LAN clients (the tutorial’s second VM) send outbound traffic via Adapter-2; pfSense NATs it to the WAN.

##### Key architectural patterns & principles
- Network segmentation: Separation of WAN, LAN, and DMZ.
- Single-point gateway: pfSense VM as central firewall/router.
- Virtualization: All components live as virtual machines on one hypervisor.
- Defense in depth: DMZ isolates public-facing services.

##### Technologies & tools to annotate
- pfSense CE (firewall OS)
- Oracle VirtualBox or VMware Workstation Player
- 7-Zip (for ISO extraction)
- Optional client OS label (Ubuntu or Windows)

6. A callout listing key tools: pfSense CE, VirtualBox/VMware, 7-Zip.

## Diagram (Mermaid)

```mermaid
flowchart TD
    internet("Internet Cloud"):::cloud
    internet -->|"WAN traffic"| pfsense["pfSense VM<br/>eth0: WAN<br/>eth1: LAN<br/>eth2: DMZ"]:::pfSense

    subgraph "LAN: int_net1 (192.168.1.0/24)"
        client["Client VM<br/>(Ubuntu/Windows)"]:::client
    end

    subgraph "DMZ: int_net2 (192.168.2.0/24)"
        dmz["Web Server (DMZ)"]:::server
    end

    pfsense -->|"eth1: LAN"| client
    pfsense -->|"eth2: DMZ"| dmz

    legend["Deployment Guide"]:::legend

    click legend "https://github.com/syedhnaqvi/pfsense/blob/main/README.md"

    classDef cloud fill:#ADD8E6,stroke:#000000,color:#000000
    classDef pfSense fill:#F8F8F8,stroke:#000000,color:#000000
    classDef client fill:#C3FDB8,stroke:#000000,color:#000000
    classDef server fill:#FFD580,stroke:#000000,color:#000000
    classDef legend fill:#FFFFFF,stroke:#000000,color:#000000
```
