Install pfSense on VirtualBox – Step-by-Step

To install pfSense on VirtualBox, download the free Netgate Installer ISO, create a FreeBSD (64-bit) VM with 1 GB of RAM, a 10 GB disk, a NAT adapter for WAN and an Internal Network adapter for LAN. Boot the ISO, pick your WAN and LAN interfaces, choose Install CE and remove the ISO before the reboot.
VirtualBox is free virtual machine software, which makes it a good place to try pfSense before you put it on real hardware. For the latest pfSense tutorials, make sure to check out the pfSense Category!
Short version
- Get the free Netgate Installer (AMD64 ISO) from the Netgate Store and decompress the
.gzfile. - In VirtualBox, create a VM with OS Type BSD and OS Version FreeBSD (64-bit), at least 1 GB of RAM and a 10 GB disk.
- Set Adapter 1 to NAT (WAN), Adapter 2 to Internal Network
intnet(LAN) and, if you want an OPT interface, Adapter 3 to a second internal network. - Boot the ISO, choose Install, set WAN to
em0(DHCP) and LAN toem1, then choose Install CE. - Pick ZFS, stripe and the VBOX HARDDISK, install, then remove the ISO and reboot.
- From another VM on
intnet, openhttps://192.168.1.1and log in asadmin/pfsense.
Table of Contents
- Short version
- Can you install pfSense on a Virtual Machine?
- Can pfSense be virtualized?
- What is VirtualBox?
- Install pfSense on VirtualBox
- Requirements
- Part 1: Downloading & Unzipping the pfSense ISO file
- Part 2: Creating a VM in VirtualBox
- Setting Up Installation Parameters
- Hardware Settings
- Network Interfaces
- Part 3: Install pfSense on VirtualBox
- Finishing the Installation
- Booting Up for the First Time
- Part 4: Initial Configuration
- FAQ
- Can you Install pfSense on a PC?
- How many cores can pfSense use?
- What hardware can I run pfSense on?
- Why does the pfSense installer start again after reboot?
- Conclusion
Can you install pfSense on a Virtual Machine?
This is probably the first question you ask yourself when you first look into this topic. The answer is: Yes, you can install pfSense on a virtual machine. pfSense can be installed, to our knowledge, on the following hypervisors:
- Oracle VirtualBox
- VMWare Workstation & Player
- VMWare ESXi
- XenServer
The choice here is entirely yours. If this is your first time installing pfSense, VirtualBox is a great choice since it’s completely free and works really well.
Can pfSense be virtualized?
Yes. You can virtualize your pfSense firewall and run it entirely as a virtual machine. This can be achieved if you have multiple network interfaces available on your hypervisor or if you use VLANs and trunking.
What is VirtualBox?
For those of you new to this, just a quick overview of what VirtualBox actually is. VirtualBox is a powerful software tool that allows users to create virtual machines on their computers. These virtual machines allow you to run different operating systems or environments, such as Windows, Linux, or Android, in an isolated environment directly on your current operating system.
This allows you to easily test new software or try out different configurations without affecting your main system. Additionally, VirtualBox can be used for secure remote access to computers and servers when working with other systems remotely. Whether you are looking to try out new software or gain more control over your computing experience, VirtualBox offers the perfect solution.
Install pfSense on VirtualBox
To install pfSense on VirtualBox, make sure you first fulfill all the requirements below before starting with Part 1.
Requirements
So make sure you have the following prepared:
- VirtualBox - Download the latest version of VirtualBox and install it, leaving everything as default.
- Netgate Installer ISO - The free installer for pfSense CE (select AMD64 ISO). You need a free Netgate Store account to get it.
- 7-Zip - To extract the pfSense ISO file.
The screenshot below shows the old pfsense.org download page. That page now sends you to the Netgate Store instead of offering a direct ISO download.

⚠️ If you would like to learn more about pfSense, I highly recommend you check out my pfSense Fundamentals Bootcamp over at Udemy. This is the most up-to-date as well as the highest-rated pfSense course on Udemy.
Part 1: Downloading & Unzipping the pfSense ISO file
First off, download the pfSense installer. Netgate now ships pfSense CE as the Netgate Installer through the Netgate Store: sign in to your store account, add the Netgate Installer with the AMD64 ISO option to your cart and check out. The installer is free, the checkout is only how Netgate delivers the download link.
The Netgate Installer is an online installer. It downloads pfSense from Netgate’s servers during the installation, so the VM’s WAN adapter needs internet access. The NAT adapter we set up below takes care of that.
Once downloaded, make sure you have 7-Zip installed. Head to your Downloads folder and right-click the compressed .iso.gz file.
Now choose 7-Zip (if you are on Windows 11, you have to select Show More Options first!) and select Extract Here. On macOS or Linux, run gunzip on the file instead.
Part 2: Creating a VM in VirtualBox
Start up VirtualBox and click on New.

Setting Up Installation Parameters
Now we need to set up a few things:
- Choose a name for your VM (pfSense is good!).
- Choose a location on your physical hard disk where you want to store the VM.
- Select the unzipped .iso file from your Downloads folder.
- As OS Type, choose BSD (pfSense is built on FreeBSD, not Linux).
- As OS Distribution and OS Version, choose FreeBSD and FreeBSD (64-bit).
- Click on Next to continue.
The screenshot shows VirtualBox 7.0, where these fields were called Type and Version. VirtualBox 7.2 labels them OS Type, OS Distribution and OS Version.

Hardware Settings
The hardware settings are your personal preference. Just make sure to adhere to pfSense’s minimum hardware requirements. You should assign at least 1024 MB of memory and 1 CPU. We will assign a little bit more:

Next, we need to set up the Virtual Hard Disk. 10 GB is sufficient for pfSense. If you plan to install a lot of packages, choose more:

In the final screen, make sure everything is according to your preferences and click on Finish:

Network Interfaces
Since we want to install a firewall, it will come in handy to have multiple network interfaces to play around with. One of these interfaces will serve as our WAN interface, providing us with a working internet connection.
To set up network interfaces, make sure your pfSense VM is selected and click on Settings in VirtualBox. Once inside of the settings, click on the Network tab. Here, use the following settings:
- Adapter 1:
- ☑️ Enable Network Adapter
- Attached to: NAT
- Adapter 2:
- ☑️ Enable Network Adapter
- Attached to: Internal Network
- Name: intnet
- Adapter 3:
- ☑️ Enable Network Adapter
- Attached to: Internal Network
- Name: intnet2
Give Adapter 3 its own internal network name, like intnet2. If LAN and OPT share the same internal network, both pfSense interfaces sit on one network segment, which breaks routing between them. The third screenshot still shows intnet, so change the name there.



With this setup, Adapter 1 will be our WAN adapter, Adapter 2 will be our LAN adapter, and Adapter 3 will be our OPT adapter.
Click on OK to save and proceed.
Part 3: Install pfSense on VirtualBox
Now we are ready to install pfSense on VirtualBox. To get started, click on Start while your pfSense VM is selected:

This will start the pfSense installer. You do not need to press anything on the first screen where the countdown timer is running down. Just wait for the installation to start.
On the first screen, click on Accept to accept the copyright and distribution notice.
Note: If VirtualBox “Captures” your mouse, press your right control key to release it again.
After accepting, choose Install. The screenshots in this part show the older pfSense installer. The current Netgate Installer has a few extra network and edition steps, which are described below, but the disk screens look the same.

The older installer asked for a keymap at this point, as in the next screenshot. The Netgate Installer goes to Network Setup instead: select em0 (our NAT adapter) as the WAN interface and keep DHCP Client WAN. Then select em1 as the LAN interface, keep the default LAN settings (192.168.1.1/24 with a DHCP server) and confirm the network configuration.

The installer now contacts Netgate’s servers. Because a VirtualBox VM has no pfSense Plus subscription, it shows a prompt that the device is not eligible for pfSense Plus. Choose Install CE.
Choose ZFS and continue with Enter. Don’t worry about file systems at this point. ZFS is the default for pfSense, and it’s a good system:

After confirming with Enter, we leave everything on default and hit Enter again to start the installation:

In the next step, we select stripe since we only install pfSense on a single disk.

Next, press the Space Bar to select the VBOX HARDDISK and continue with Enter:

Make sure to choose Yes on the last dialogue to start with the pfSense installation:

Next, the installer asks which version to install. Pick the latest pfSense CE release (2.9.0 as of November 2026). The installation will now run. Since it downloads the packages first, it usually takes a couple of minutes.
Finishing the Installation
Once the installation has finished, the older installer asked if you want to make additional changes, as in the screenshot below (select No). The Netgate Installer skips that question and goes straight to the reboot prompt:

Now, we must remove the .ISO file from VirtualBox before rebooting. Otherwise, we end up at the beginning of the installation routine again. To do that, click on Devices on the Menu Bar where your pfSense VM is running, click on Optical Drives and then Remove Disk From Virtual Drive. If another dialogue pops up if you want to unmount forcefully, select Yes.

And finally, select Reboot to reboot the virtual machine:

Booting Up for the First Time
pfSense will now boot up for the first time. If you have followed through each of the steps so far, the console shows em0 (Adapter 1, NAT) as WAN and em1 (Adapter 2) as LAN, the interfaces you picked in the installer. To add Adapter 3 as OPT1, use option 1) Assign Interfaces in the console menu, or Interfaces / Assignments in the web interface later. The screenshot below shows all three interfaces assigned:

DHCP is enabled by default on the LAN interface. pfSense has 192.168.1.1 as its default IP Address.
Part 4: Initial Configuration
Now, with a VM or Computer residing on the same Subnet (you need to have another VM inside of the Internal Network (intnet) to be able to connect to pfSense. You can use Lubuntu for this as a lightweight system.
Open a Web Browser and enter the IP of your pfSense Firewall: 192.168.1.1
You can safely add an exception to your Browser and ignore the Security Warning. If you want to know how to get a Secure Connection to pfSense, read my Article on it!

Log in with the Default Credentials: admin / pfsense. Change that password in the setup wizard.
Run through the Initial Configuration Wizard to finish the installation and configuration of pfSense. And that’s it for the installation part. Check out the pfSense Tutorial Section to continue from here.
FAQ
We get a lot of questions in terms of installing pfSense. We try to cover a few of them below.
Can you Install pfSense on a PC?
Yes, it is certainly possible to install pfSense on a PC. All you need is supported hardware and a network card with multiple network interfaces. If you have an old PC lying around, you can turn it into a budget firewall!
How many cores can pfSense use?
pfSense runs on FreeBSD, which uses all the CPU cores you give it. How much extra cores help depends on the workload: multi-queue network cards, VPNs and packages like Suricata spread across cores better than a single traffic stream. For a VirtualBox lab, 1 or 2 virtual CPUs are plenty.
What hardware can I run pfSense on?
pfSense CE needs a 64-bit amd64 (x86-64) CPU, at least 1 GB of RAM and an 8 GB disk. That can be a small hardware appliance from Netgate or a third-party vendor, a server, or an old PC or laptop with two network ports.
Why does the pfSense installer start again after reboot?
The VM is still booting from the ISO. In the running VM window, go to Devices / Optical Drives / Remove Disk From Virtual Drive, then reboot. You can also remove the ISO in the VM’s Settings / Storage while the VM is powered off.
Conclusion
This is how easy it is to install pfSense on VirtualBox. It is also a great way to play around with the firewall before dedicating it to a physical device. Make sure to check out some of our other pfSense Tutorials!
👀 This Tutorial has some related Articles!
👉 The Complete pfSense Fundamentals Bootcamp
👉 Install pfSense from USB - The Complete Guide
👉 Install pfSense on VirtualBox
👉 The Complete pfSense OpenVPN Guide
👉 The Complete pfSense DMZ Guide
👉 Generate SSL Certificates for HTTPS with pfSense
👉 The Complete pfSense Squid Proxy Guide (with ClamAV!)
👉 pfSense Site-to-Site VPN Guide
👉 pfSense Domain Overrides Made Easy
👉 pfSense Strict NAT (PS4,PS5,Xbox,PC) Solution
👉 The Best pfSense Hardware
👉 Traffic Shaping VOIP with pfSense
👉 pfSense OpenVPN on Linux - Setup Guide
👉 pfSense Firewall Rule Aliases Explained
👉 Email Notifications with pfSense
👉 pfSense DNS Server Guide
6 thoughts on “Install pfSense on VirtualBox – Step-by-Step”
Comments are closed. I keep the discussion here because the answers still help.
More posts
All pfSense


telecharger l'iso de pfsence
hi Sir,
Im having a problem with the internet connection of the Kali Linux which can access pfSense but no the internet .The pfSense has been configured as NAT (tried also Bridge) and is connected to internet. How can I fix this ?
Is the DHCP Server enabled?
sir i’m unable to install it on VM. after rebooting, it again starts installation process.
secondly if i uncheck pfsense iso from devices it pops up with error.
kindly help me out.
thanking in advance.
You have to click on Devices -> Optical Drives -> Remove Disk from Virtual Drive.
I use the same configuration but I tried to open it from kali linux but I didn't get access to pfsense interface on the web browser so please can you help me with it