HOWTO: Run pfSense nanobsd in VirtualBox

There’s a very useful howto on the pfsense forums showing step-by-step how to run pfSense in virtualbox:

  1. Get Oracle VirtualBox from https://www.virtualbox.org/ or from the repo of your distribution. Works in Windows, Linux too.
  2. Download a VGA-enabled nanobsd version of pfSense from here. For example pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.img.gz.
  3. Decompress the .gz to get a plain disk image .img file (you need pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.img)
  4. Convert the disk image to a virtual hard disk using this command:
    1. Code: VBoxManage convertfromraw pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.img pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.vdi
    2. Don’t worry if the .vdi file will be much smaller. It will actually be a dynamic virtual disk, which physically occupies only the amount of data which is not empty.
  5. Create a new virtual machine in VirtualBox, using these settings:
    1. Enable IO APIC
    2. 512MB of RAM (or more, I guess)
    3. no audio, no USB
    4. 2 network adapters, first bridged to your physical NIC, second “Host-Only Adapter”, both Intel PRO/1000 T Server. Untick “Cable connected”
    5. a serial port, just to be sure
    6. use as hard disk the .vdi image you created in step 4
  6. Boot up the virtual machine, let pfSense start up
  7. Assign network interfaces as usual, to simulate cable connection open “Network Adapters” window and tick back  “Cable connected” when appropriate. Make the first (em0) as WAN, the second (em1) as LAN.
  8. Set manually IP address of LAN to 192.168.56.10 (or any IP within your “Host-Only Adapter network”)
  9. Type your LAN address in your browser and you’re in!

One thought on “HOWTO: Run pfSense nanobsd in VirtualBox

  1. Ton says:

    Thanks very much for this clear tuto :-) I can’t seem to do the last one, assigning the IP. It detected em0 and em1, and in the setup screen I’ve assigned 192.168.1.25 to the LAN (choice 2) in the menu, but although it says it configured that succesfully, there is no 192.168.1.25 on the LAN. Would you know what I am doing wrong? Thank you :-)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>