Post

Setting Up pfSense: A Step-by-Step Guide

Security and Pentest Home Lab Environment

Setting Up pfSense: A Step-by-Step Guide

🧱 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

Desktop View

The downloaded file will have the extension .iso.gz. Use a tool like 7-Zip to extract the .iso image.


πŸ–₯️ Create pfSense VM

  1. Open VirtualBox β†’ Click Tools β†’ New
  2. Set:
    • Name: pfSense
    • Type: BSD
    • Version: FreeBSD (64-bit)
    • Choose the extracted .iso as the ISO image
  3. Click Next

Desktop View

  1. Accept the default memory/CPU settings β†’ Click Next

Desktop View

  1. Set disk size to 20GB β†’ Click Next

Desktop View

  1. Review β†’ Click Finish

πŸ—‚οΈ Organize VM into Group

  1. Right-click pfSense VM β†’ Move to Group β†’ [New]
  2. Right-click New Group β†’ Rename to Firewall

Desktop View


βš™οΈ Configure pfSense VM Settings

Select pfSense VM β†’ Click Settings

🧠 System

  • System β†’ Motherboard
    • Boot Order: Hard Disk, then Optical
    • Uncheck Floppy

Desktop View

πŸ”‡ Disable Unused Hardware

  • Audio: Uncheck Enable Audio
  • USB: Uncheck Enable USB Controller

Desktop View

🌐 Network Adapters

Configure 4 adapters:

  • Adapter 1 (NAT):
    • Attached to: NAT
    • Type: Paravirtualized Network (virtio-net)

Desktop View

  • Adapter 2 (LAN 0):
    • Attached to: Internal Network
    • Name: LAN 0
  • Adapter 3 (LAN 1):
    • Attached to: Internal Network
    • Name: LAN 1
  • Adapter 4 (LAN 2):
    • Attached to: Internal Network
    • Name: LAN 2

Desktop View

Note: VirtualBox only supports 4 adapters via UI. We’ll add more using CLI later.


πŸ”§ Install pfSense

  1. Select pfSense VM β†’ Click Start
  2. Wait for the license screen β†’ Press Enter
  3. Begin install β†’ Auto (ZFS) β†’ Proceed with Installation

Desktop View

  1. Choose: Stripe - No Redundancy
  2. Select disk (ada0) β†’ Spacebar β†’ Enter
  3. Confirm β†’ Highlight YES β†’ Enter

Desktop View

  1. Reboot after install completes

Desktop View


πŸ”Œ Assign Interfaces

When prompted about VLANs β†’ type n

Assign:

  • WAN: vtnet0
  • LAN: vtnet1
  • OPT1: vtnet2
  • OPT2: vtnet3

Type y to confirm

Desktop View

The WAN IP will be different on your system (set by VirtualBox DHCP).


πŸ› οΈ Configure Interfaces

πŸ” LAN (vtnet1)

  • Press 2 β†’ then 2 again
  • Use static IP: 10.0.0.1/24
  • Enable DHCP:
    • Start: 10.0.0.11
    • End: 10.0.0.243
  • Decline HTTP switch: n

Desktop View

βš”οΈ OPT1 (vtnet2)

  • IP: 10.6.6.1/24
  • DHCP Range: 10.6.6.11 – 10.6.6.243
  • Decline HTTP switch: n

Desktop View

🧬 OPT2 (vtnet3)

  • IP: 10.80.80.1/24
  • DHCP: Disabled
    (AD Domain Controller will handle DHCP)

Desktop View

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.

Desktop View


🧽 Post-Install Cleanup

  1. Go to Settings β†’ Storage
  2. Select .iso image β†’ Click the disk icon β†’ Remove Disk from Virtual Drive

Desktop View

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

πŸ‘‰ Next β†’ Installing Kali Linux for Your Lab

This post is licensed under CC BY 4.0 by the author.