An enterprise-grade network security lab deploying pfSense as a perimeter firewall with Suricata running in active Intrusion Prevention System (IPS) mode — upgrading from detection-only to real-time attack blocking.
Lab 2 of the SOC Home Lab series — builds on the NSM Lab (Lab 1)
┌─────────────────────────────────────────────────────────┐
│ VirtualBox Environment │
│ │
│ Internet │
│ │ │
│ ▼ │
│ ┌─────────────────────────────┐ │
│ │ pfSense Firewall │ │
│ │ WAN: NAT (Internet) │ │
│ │ LAN: Host-Only (.254 GW) │ │
│ │ │ │
│ │ ┌─────────────────────┐ │ │
│ │ │ pfBlockerNG │ │ ← Geo-blocking │
│ │ │ Malicious IP Alias │ │ ← Known bad IPs │
│ │ │ Suricata IPS │ │ ← Inline packet drop │
│ │ └─────────────────────┘ │ │
│ └──────────────┬──────────────┘ │
│ │ Secure LAN (192.168.x.0/24) │
│ ┌────────────┼────────────┐ │
│ ▼ ▼ ▼ │
│ Ubuntu Ubuntu Windows 10 │
│ Server Desktop (Endpoint) │
│ (Monitor) (Attacker) │
└─────────────────────────────────────────────────────────┘
All VM traffic is routed strictly through pfSense — no direct internet access from endpoints.
| Tool | Purpose |
|---|---|
| pfSense CE | Perimeter firewall & network gateway |
| pfBlockerNG-devel | Geo-blocking & malicious IP blocking |
| MaxMind GeoLite2 | Geographic IP database |
| Suricata IPS | Inline intrusion prevention (60,000+ signatures) |
| VirtualBox | Virtualization platform |
| Setting | Value |
|---|---|
| OS | FreeBSD (pfSense CE ISO) |
| CPU | 2 cores |
| RAM | 2 GB |
| Storage | 20 GB |
| Adapter 1 (WAN) | NAT |
| Adapter 2 (LAN) | Host-Only Network |
- DNS servers updated to Google (
8.8.8.8) - Admin credentials locked down
- Custom domain assigned:
cdm.local
A custom firewall alias (malicious_IPs) groups known bad IP addresses into a single entry — blocking entire threat groups at the WAN layer with one rule.
- Install
pfBlockerNG-develpackage inside pfSense - Register for a free MaxMind GeoLite2 account
- Sync geographic IP ranges into pfSense
- Create WAN rules to drop all traffic from high-risk regions automatically
| Mode | Action |
|---|---|
| IDS (Lab 1) | Detects and alerts — traffic still passes |
| IPS (Lab 2) | Detects and drops — traffic blocked in real time |
- Install Suricata on pfSense
- Enable Block Offenders option
- Set mode to Inline Mode
- Load threat intelligence rulesets:
- Malware signatures
- System scan detection
- Exploit behavior patterns
- Disabled direct NAT adapters on all lab VMs (Ubuntu Server, Ubuntu Desktop, Windows 10)
- All internet traffic now forced through pfSense gateway
Linux (Ubuntu) — Netplan:
network:
version: 2
ethernets:
enp0s3:
dhcp4: no
gateway4: 192.168.x.254 # pfSense LAN IP
nameservers:
addresses: [8.8.8.8]Windows 10:
- Network Adapter → IPv4 Properties
- Default Gateway:
192.168.x.254(pfSense LAN IP)
From Ubuntu Desktop, run:
curl http://testmynids.org/uid/index.htmlResult 1 — Alert mode: Traffic flagged but allowed through Result 2 — After switching rule to Drop: Connection times out — packet blocked at perimeter
pfSense dashboard logs confirm the packet was dropped at the WAN layer before reaching any endpoint.
pfsense-ips-lab/
├── README.md # This file
├── docs/
│ └── setup-notes.md # Detailed configuration notes
├── rules/
│ └── custom-notes.md # Suricata rule modifications used
└── screenshots/
└── .gitkeep # Evidence screenshots
- pfSense firewall deployment and configuration from scratch
- Dual-interface WAN/LAN network segmentation
- Geo-blocking implementation with pfBlockerNG + MaxMind GeoLite2
- Custom firewall alias creation for threat group blocking
- Suricata upgrade from passive IDS → active IPS inline mode
- Endpoint network isolation and gateway rerouting
- IPS validation using testmynids.org
- Real-time packet drop verification via pfSense dashboard logs
| Lab | Project | Status |
|---|---|---|
| Lab 1 | NSM Stack — TShark + Zeek + Suricata IDS | ✅ Complete |
| Lab 2 | pfSense Firewall + Suricata IPS (this repo) | ✅ Complete |