In today’s digital landscape, cybersecurity is more important than ever. Cybersecurity has become an increasingly more important concern for organizations and individuals. With cyber threats and new constantly changing vulnerabilities, it is important for you to have a firewall set up if you value your network safety. That’s where PfSense is able to come in.
PfSense is an open source firewall and router that provides advanced security features and powerful capabilities for your network. It is widely used and has a ton of community support. A lot of small and large organizations use pfSense to protect their networks.
So today I will guide you on how to install pfSense on a virtual machine using Virtual Box.
Firstly, have Virtual Box downloaded. Fairly simple install. But once you open VirtualBox you want to create a new Virtual Machine and you’ll get this pop up.
We are going to name it pfSense Firewall. Change the “Type:” to BSD and the version to “FreeBSD (64-bit.) Then hit “Next.”
pfSense does not need much hardware allocated to it unless you’re running aton of different packages on it. So here I just allocated 1GB of RAM and 1 core from my CPU. Hit “Next”
Here we are allocating 16GB of RAM. Hit “Next”
Now once you’re finished, you want to change the network settings on it. First go to Adapter 1 and make sure it is attached to NAT.
Then go to Adapter 2 and attach it to the internal network
Next, we are going to attach the pfSense .iso file here so we can install. After this, click okay, then double click on the pfSense Firewall VM. This will start it.
Here is the VM initially starting up.
Here, we press enter to Accept.
Press enter to Install pfSense.
Here we are going to continue with our default keymap, so we press enter.
Here, we use our arrow keys to go down one option until we get to Auto (UFS) BIOS. Press enter.
Now the installation begins.
After it is done installing, we can go ahead and press enter to the “No” option, as we do not want to open a shell in the new system to make any final manual modifications.
Then we get here. Here we press enter on “Reboot” option. This will reboot the system.
Here the system is rebooting. Let it complete.
Once it’s finally done you should get something like this. Here we want to enter option number 2, to set interfaces IP Address. To do that, you simply type “2” on your keyboard and press enter. The reason we want to Set Interfaces IP Address is because the current set up conflicts with my home router. I believe most routers have the same or similar set up, so continue along to avoid conflicts with yours.
Enter “2” and press enter here.
Here, type in the new IP address for your pfSense firewall. I chose 192.168.50.1 because it does not conflict with my current home network setup.
Next it asks us to enter the subnet bit count, so we enter “24”.
Type in ‘y’ because we do want to set up DHCP server on our LAN interface. DHCP will automatically allocate IP Addresses to any host connected to this network.
Here it is asking us to enter the starting address for the IPv4 client address range. We will set it to 192.168.50.20
And we will finish off the range with 192.168.50.250
Now we are done, we will go to https:[yourpfsenseIP] to access it via a web browser. To do this I will use a Kali Linux VM that is connected to the same network virtually. So it has the exact same network settings we configured for our pfSense firewall.
Here it warns us about an invalid security certificate, accept the risk and continue.
The default credentials here are “admin” for your username and “pfsense” for your password.
Once we start going through the configuration it will ask us for a Primary DNS Server. We will use Googles, which is 8.8.8.8. Make sure “Override DNS” is checked. This will allow the DNS Server from your home router to be used. Click “Next”
Next we will leave everything here as default. scroll to the bottom and click “Next”
Here we are confirming the LAN IP address. Leave it as is. Click”Next”
Here it asks us to change our default password, which I do. Click “Next”
Click “finish” here.
Now, on the Kali Linux machine I go into the terminal and type in ifconfig. Here you can see we have an IP Address that matches the parameters we specified earlier.
Just so we can see that our Kali Linux VM is actually connected to the pfSense router/firewall, we go into “Status” on the menu above and click “DHCP Leases.” After that you should see a screen like this. From here we can see all the IP Addresses in use currently. And you can see our Kali Linux VM is on here.
Congrats, you now have pfSense installed! From here you can customize it to however you’d like, you can set up new firewall rules, install packages such as Snort or Suricata, which are IDS/IPS, and configure them to send you alerts when somebody from a different network attempts a port scan on your network.
In conclusion, pfSense is an excellent choice for anyone looking to beef up their network security. With advanced security features, network capabilities, it can help protect your network. In this blog post we covered the installation of pfSense on a Virtual Box VM, but you can install it on physical hardware as well if you have your own physical server that you would like to install pfSense on!