Cybersecurity Home Lab

Firewall &
Network Segmentation

A production-grade virtual firewall infrastructure powered by pfSense CE, isolating five security zones behind stateful packet inspection, outbound NAT, and Unbound DNS โ€” all running on VirtualBox.

7
Interfaces
5
Security Zones
25+
Firewall Rules
4
Core Services

Architecture at a Glance

Built on pfSense CE 2.7.x (FreeBSD 14.0-RELEASE) with resource allocation and multi-NIC topology.

๐Ÿ›ก๏ธ
pfSense CE 2.7.x
Firewall Engine
๐Ÿ’ป
2 vCPU / 1 GB
VM Resources
๐Ÿ“ฆ
VirtualBox
Hypervisor
๐ŸŒ
7 NICs
Network Interfaces

Architecture Diagram

Packet flow through the firewall โ€” from the Internet through pfSense and into each segmented security zone.

โ˜ INTERNET em0 โ€” NAT pfSense FIREWALL MANAGEMENT 10.0.0.0/24 em1 WebGUI Ubuntu VM CYBER RANGE 10.10.10.0/24 em2 WAF Targets ACTIVE DIR 10.20.20.0/24 em3 DC01 Win11 SECURITY 10.30.30.0/24 em4 Wazuh Suricata MALWARE 10.40.40.0/24 em5 ๐Ÿ”’ ISOLATED FLARE-VM Cuckoo TRAFFIC FLOW Management โ€” Full access Cyber Range โ€” Limited cross-subnet Active Dir โ€” Isolated from Cyber & Malware Security โ€” Receives all log streams Malware โ€” Zero cross-VLAN (sandboxed)

Security Zone Breakdown

Each interface maps to an isolated internal network with unique CIDR addressing, DHCP pools, and access policies.

Interface Zone Subnet Gateway DHCP Pool Access Policy
em0 WAN DHCP (NAT) Variable Upstream External internet gateway
em1 Management 10.0.0.0/24 10.0.0.1 .100 โ€“ .200 Full admin access to all zones & WebGUI
em2 Cyber Range (DMZ) 10.10.10.0/24 10.10.10.1 .100 โ€“ .200 Deliberately vulnerable systems & CTF targets
em3 Active Directory 10.20.20.0/24 10.20.20.1 .100 โ€“ .200 Internet โœ“ | Isolated from Cyber & Malware
em4 Security 10.30.30.0/24 10.30.30.1 .100 โ€“ .200 Receives syslog/SIEM from all zones
em5 Malware 10.40.40.0/24 10.40.40.1 Disabled ๐Ÿ”’ Zero cross-VLAN โ€” fully sandboxed
em6 HOST_MGMT 192.168.56.0/24 192.168.56.2 Disabled (Static) Trusted physical Kali administration link

Security Rule Matrix

Top-to-bottom, first-match-wins rule processing with default-deny posture across all interfaces.

๐Ÿ›ก
Management (em1)
10.0.0.0/24
  • PASS Admin hosts โ†’ WebGUI & SSH
  • PASS DNS queries โ†’ pfSense resolver
  • PASS Outbound Internet access
  • PASS Full access to all internal subnets
  • DENY Default deny catch-all
๐ŸŒ
Cyber Range / DMZ (em2)
10.10.10.0/24 โ€” Demilitarized Zone
  • PASS Inbound traffic to Web & WAF services
  • PASS Security logs โ†’ Wazuh/SIEM (514/1514)
  • DENY ALL traffic initiated to Management net
  • DENY Block initiated access to Active Directory
  • DENY Block access to Malware sandbox
  • PASS Outbound Internet for updates (scoped)
๐Ÿข
Active Directory (em3)
10.20.20.0/24
  • PASS DNS โ†’ local resolver
  • PASS AD audit logs โ†’ SIEM
  • DENY Block access to Management net
  • PASS Internet for WSUS / NTP
๐Ÿ“ก
Security Ops (em4)
10.30.30.0/24
  • PASS DNS โ†’ pfSense
  • PASS SIEM scanners โ†’ internal hosts
  • PASS Internet for threat intel feeds
โ˜ฃ
Malware Sandbox (em5)
10.40.40.0/24
  • PASS DNS (intercepted / sinkholed)
  • DENY ALL inter-VLAN access blocked
  • DENY Direct WAN access blocked
  • PASS Optional controlled detonation
๐Ÿ“œ
Global Principles
All Interfaces
  • DENY Default deny all inbound & inter-subnet
  • PASS Stateful return traffic auto-permitted
  • PASS Top-to-bottom, first-match-wins
  • DENY Malware zone โ€” zero cross-VLAN

Structured Learning Path

Follow this five-phase roadmap to build a deep understanding and successfully deploy the entire lab.

Phase 1 โ€” Understand
Conceptual Architecture & Design
Study the design rationale, network topology diagrams, and master IP allocation plan. Understand why pfSense acts as the central gateway with 7 adapters emulating enterprise hardware.
Phase 2 โ€” Provision
Hypervisor & Base OS Setup
Create VirtualBox VMs with proper resource allocation. Install pfSense CE, assign console interfaces (em0โ€“em6), and deploy the Ubuntu management workstation.
Phase 2.5 โ€” Configure
Post-Wizard Configuration Protocol
Rename interfaces, assign static gateway IPs, enable DHCP pools, verify internet egress, create network aliases, and take a baseline VirtualBox snapshot.
Phase 3 โ€” Enforce
WebGUI Services & Policy Enforcement
Configure DHCP scopes, implement stateful default-deny firewall rules, set up outbound NAT & port forwarding, and harden Unbound DNS resolver with AD domain overrides.
Phase 4 โ€” Verify
Validation & Diagnostics
Execute cross-subnet ping tests, Nmap scans, and WebGUI access checks. Use the troubleshooting guide for DHCP failures, DNS loops, and adapter mismatches.

Project File Organization

Every configuration decision, installation step, and validation procedure is documented and version-controlled.

. โ”œโ”€โ”€ README.md # Master Build Documentation & Architecture โ”œโ”€โ”€ assets/ โ”‚ โ”œโ”€โ”€ home_lab_network_architecture.png # Network architecture diagram โ”‚ โ””โ”€โ”€ firewall_traffic_flow.png # Detailed firewall traffic flow diagram โ”œโ”€โ”€ architecture/ โ”‚ โ”œโ”€โ”€ network-diagram.drawio # Editable network topology source โ”‚ โ”œโ”€โ”€ topology.png # Rendered topology diagram โ”‚ โ”œโ”€โ”€ topology.svg # Vector topology diagram โ”‚ โ”œโ”€โ”€ ip-plan.md # IP allocation & subnetting plan โ”‚ โ””โ”€โ”€ design-rationale.md # Design decisions & isolation rationale โ”œโ”€โ”€ installation/ โ”‚ โ”œโ”€โ”€ setup-vbox-vm.sh # Automated 7-adapter provisioning script โ”‚ โ”œโ”€โ”€ virtualbox.md # VirtualBox VM creation guide โ”‚ โ”œโ”€โ”€ kali-network-setup.md # Physical Kali host access (HOST_MGMT) โ”‚ โ”œโ”€โ”€ pfsense-install.md # pfSense ISO installation walkthrough โ”‚ โ”œโ”€โ”€ interface-assignment.md # NIC mapping (em0โ€“em6) โ”‚ โ””โ”€โ”€ dhcp.md # DHCP scope configuration โ”œโ”€โ”€ configuration/ โ”‚ โ”œโ”€โ”€ firewall-rules.md # Firewall rules matrix & policy logic โ”‚ โ”œโ”€โ”€ dns-resolver.md # Unbound DNS & hardening โ”‚ โ”œโ”€โ”€ nat.md # Outbound NAT & port forwarding โ”‚ โ””โ”€โ”€ aliases.md # Firewall aliases definition โ”œโ”€โ”€ validation/ โ”‚ โ”œโ”€โ”€ connectivity.md # Inter-VLAN routing & ping matrix โ”‚ โ””โ”€โ”€ troubleshooting.md # Diagnostic solutions โ””โ”€โ”€ backup/ โ””โ”€โ”€ config.xml # Exported pfSense configuration