Setting Up pfSense: A Step-by-Step Guide
Security and Pentest Home Lab Environment
π§± Part 2 β pfSense Setup & Configuration
In this module, weβll install and configure pfSense
, the open-source firewall that segments and secures your home lab network.
Go to the official download page:
pfSense CE Download
The downloaded file will have the extension .iso.gz
. Use a tool like 7-Zip
to extract the .iso
image.
π₯οΈ Create pfSense VM
- Open VirtualBox β Click
Tools
βNew
- Set:
- Name:
pfSense
- Type:
BSD
- Version:
FreeBSD (64-bit)
- Choose the extracted
.iso
as the ISO image
- Name:
- Click
Next
- Accept the default memory/CPU settings β Click
Next
- Set disk size to
20GB
β ClickNext
- Review β Click
Finish
ποΈ Organize VM into Group
- Right-click pfSense VM β
Move to Group
β[New]
- Right-click
New Group
β Rename toFirewall
βοΈ Configure pfSense VM Settings
Select pfSense VM β Click Settings
π§ System
System β Motherboard
- Boot Order:
Hard Disk
, thenOptical
- Uncheck
Floppy
- Boot Order:
π Disable Unused Hardware
Audio
: UncheckEnable Audio
USB
: UncheckEnable USB Controller
π Network Adapters
Configure 4 adapters:
- Adapter 1 (NAT):
- Attached to:
NAT
- Type:
Paravirtualized Network (virtio-net)
- Attached to:
- Adapter 2 (LAN 0):
- Attached to:
Internal Network
- Name:
LAN 0
- Attached to:
- Adapter 3 (LAN 1):
- Attached to:
Internal Network
- Name:
LAN 1
- Attached to:
- Adapter 4 (LAN 2):
- Attached to:
Internal Network
- Name:
LAN 2
- Attached to:
Note: VirtualBox only supports 4 adapters via UI. Weβll add more using CLI later.
π§ Install pfSense
- Select pfSense VM β Click
Start
- Wait for the license screen β Press
Enter
- Begin install β
Auto (ZFS)
βProceed with Installation
- Choose:
Stripe - No Redundancy
- Select disk (
ada0
) βSpacebar
βEnter
- Confirm β Highlight
YES
βEnter
- Reboot after install completes
π Assign Interfaces
When prompted about VLANs β type n
Assign:
- WAN:
vtnet0
- LAN:
vtnet1
- OPT1:
vtnet2
- OPT2:
vtnet3
Type y
to confirm
The WAN IP will be different on your system (set by VirtualBox DHCP).
π οΈ Configure Interfaces
π LAN (vtnet1)
- Press
2
β then2
again - Use static IP:
10.0.0.1/24
- Enable DHCP:
- Start:
10.0.0.11
- End:
10.0.0.243
- Start:
- Decline HTTP switch:
n
βοΈ OPT1 (vtnet2)
- IP:
10.6.6.1/24
- DHCP Range:
10.6.6.11
β10.6.6.243
- Decline HTTP switch:
n
𧬠OPT2 (vtnet3)
- IP:
10.80.80.1/24
- DHCP: Disabled
(AD Domain Controller will handle DHCP)
Final Interface IPs:
- LAN:
10.0.0.1
- OPT1:
10.6.6.1
- OPT2:
10.80.80.1
βΉοΈ Shutdown pfSense
When youβre done:
1
2
Enter an option: 6
Do you want to proceed?: y
This halts the system safely.
π§½ Post-Install Cleanup
- Go to
Settings β Storage
- Select
.iso
image β Click the disk icon βRemove Disk from Virtual Drive
You can delete the
.iso
and.iso.gz
files if you donβt plan to reuse them.
π Whatβs Next?
Weβll now set up Kali Linux on the LAN
interface. This VM will be used to:
- Access the pfSense Web UI
- Configure network rules
- Launch attacks on the
CYBER_RANGE