📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Install pfSense on Proxmox (The Easy Way!)

Tech Me Out20:20

Transcription

All right everyone, thank you so much for being here today. Thank you for joining me. I decided to completely skip doing an intro for this video in order to, in order to save time.

What we are going to do in this video is we are going to install pfSense as a virtual machine on a Proxmox host. By the way, if you've been following this channel, you know that I've created several videos in the past that are very similar, but they were on ESXi. And I've completely switched my home lab from ESXi to Proxmox, and I found this process to be a lot easier than what I thought it would be. The only thing I found more cumbersome to accomplish is the installation of the Proxmox equivalent of VMware Tools, which is the QEMU guest agent. But again, you only have to do it once.

So, in order to do, in order to follow along, what you will need to do, you will need to have a computer with more than one network port. I have almost a similar device right here. You will need to install Proxmox on it. It's not that difficult, but it's a video on its own. Make sure to download the pfSense ISO. Just go to your favorite search provider, search for pfSense download, download the ISO, and have it on your computer. And also have your ISP connection details. For example, if you're, if you connect to your internet via PPPoE, have your, your username and password already prepared.

And once all the prerequisites are met, what you will need to do is to connect your computer to one port on the physical host and your ISP device to another port. And as when you installed Proxmox on your host, you had to give it an IP address, which is static. And now your computer, since it doesn't have any router or DHCP server in the network, it doesn't have an IP address. So go ahead and open your network connections and give your computer a static IP address in the same subnet that you gave your Proxmox host. For example, I gave my Proxmox host an IP address of 192.168.1.100.2, so I gave my computer 192.168.1.1 in the same subnet.

And the easiest way to make sure that everything is working as expected at this point is to just open up a terminal or a CMD or whatever, and just try to ping the IP address of your Proxmox host. In my case, this is the IP address, and I get a reply, meaning that at this point, even though I do not have an internet connection, I do have a LAN connection to my Proxmox host, and I can start working.

So let's pull up our, our web browser. In fact, let me open up a new tab and type HTTPS, the IP address of your Proxmox host, colon 8006. That's the IP address and the port Proxmox web interface listens on. Enter. If you get a, a certificate warning, just click to continue, and you will get to your Proxmox web interface. Now, you might get prompted for a username and password, and since I've already typed it, it doesn't ask me once more.

Now let's go to our local storage on our Proxmox host and go to ISO images. You can see that I already uploaded my pfSense ISO, but if you haven't, just click on upload, select the file. For me, it's in downloads, and upload it to your Proxmox host because we will need this ISO file to create our virtual machine.

Another thing we will need to do. Go into your host level right here and go to network. And as you can see, we only have a bridge to our, our LAN network. We will need to create a Linux bridge to our WAN network. This Linux bridge used this physical network port, and that's, that's the port my computer is connected to. So I will create a new bridge, and I will use this network port. This is the network port I connected my ISP modem to. So let's click on create Linux bridge. That will be the name of the bridge. I will not give it any IP address at all. I'm going to make it VLAN aware, why not? And I'm going to type the name of the network port. This will be what I need to type in this field. So it's enp2s0. Now, it might be different port names for you, so just try to use the next available bridge port, sorry. If it doesn't work, try to change to this one. If it doesn't work, try to change to this one. It depends on the amount of network ports on your physical host. So let's click on create. And now when we'll create our pfSense virtual machine, we will be able to assign two network network interfaces to it, one for LAN, one for WAN.

All right, so now that our network configurations have been created, do not forget to click on apply configuration, or nothing that we have done will ever take place. Okay, so that's done. Now we can actually go ahead and create our virtual machine. So let's select our host right here, right-click, create VM. Let's call it pfSense. Let's select our pfSense ISO that we have uploaded to our host. Guest OS can stay on Linux, that's fine. Now, as, as in firmware, whatever your host device uses, select for your virtual machine. For example, my host uses Legacy BIOS, I'm going to stick with BIOS for my virtual machine. I am going to select QEMU agent and click on next. This, I'm going to leave as is, as the default, and click next. CPU depends on how many resources you want to give your virtual machine. I'm going to select, for example, to give it two cores. Next. Memory, 2 gigs is just fine. Network, I'm going to select no network device, just for now. Next. Finish. And now our virtual machine is going to be created. Here it is. That's great.

Let's go to hardware and now add a network device for, for our LAN. It will be on vmbr0. Great. And another one for our WAN. So let's select our newly created bridge, vmbr1. Add. Great. So now let's power on our virtual machine and let's go to console. And now we'll actually install pfSense from our ISO to our virtual hard drive.

All right, so select accept install auto ZFS, that's fine. Install stripe. Click on space to select the virtual hard disk. Enter. And select yes. And now the installation process will begin.

All right, so now the installation is over. Let's click on reboot. And that's actually how easy it is to install VM, to install, sorry, pfSense as a for from an ISO to an to a hard disk. All right, so now pfSense is booting, and now from our hard drive, it's already installed. This can take anywhere for a minute, 2 minutes, 3 minutes. I will pause the recording and resume it once this booting up process is done.

All right guys, so pfSense is loaded, and we can see that our two virtual interfaces are identified, that they are up. Here are their MAC addresses, that will be important in just a minute. And actually, if we have missed a question, do you want to set up VLANs now? Yes or no. So click N as in no and enter.

All right, now pfSense wants you to tell him which of these two devices will be assigned to WAN. So we can know that by going to hardware, and I know that the device that's assigned to our, to my vmbr1 bridge, that's the WAN bridge, its MAC address ends in 93. So now I'm going to go back to the console, and I see that the device that ends in 93 is called vtnet1. So that's exactly what I'm going to type here. vtnet1, that's my WAN interface, and vtnet0 is my LAN interface. Do you want to proceed? Yes. So now pfSense will configure our interfaces. Again, that can take anywhere from a minute to 5 minutes. I'm going to pause the recording and resume it once this process is done.

All right, so pfSense is finished its initial configuration, and we can see that we have IP addresses. And most importantly, I can see that I have a WAN IP address and a LAN IP address in the respected interfaces, meaning that my interface selection step was correct. But you can see that the LAN IP address pfSense uses by default is 192.168.1.1, and our subnet is 192.168.0.0. Do something. So let's go ahead and select two to set interfaces IP addresses, and I'm going to select two because I'm referring to my LAN IP address. And now, do I want to configure IP address via DHCP at this point? No, I want to assign my LAN interface a static IP, and a static IP should be 192.168.1.100.1 on a 24 subnet. Enter. Do I want to configure IPv6? For now, I have no need to do that. Enter. Do you want to enable the DHCP server? I generally tend to select yes, and I'm going to start in 192.168.1.15 to 182, sorry, I made a typo, 192.168.100.150, and the end of the scope will be 192.168.1.100.00. Do we want to revert to HTTP as our web configuration, web as our pfSense web UI? I generally type yes until I get a certificate, and then I assign the HTTPS.

All right, so now it tells me if you want to get into your pfSense web interface, this is what you need to type in your browser. So that's exactly what we are going to do. And just like that, we are in our pfSense web interface. Default username is admin, default password is pfSense. So let's go ahead and start configuring pfSense. Click on next, next. Host name, if you want to change it, that's fine. If you want to change your DNS servers, meaning the DNS servers for your WAN connection, you can go ahead and do it here. Click on next. Select your time zone. Next. How do you connect to your WAN interface, meaning your ISP connection details? Mine is really DHCP, but if you're using PPPoE, that's what you'll select right here. Again, click on next. Your LAN IP address, we have just configured it in the console, so we don't need to do anything right here. You need to, to change, you need to change your admin password, it cannot stay as the default pfSense. Click on next. Reload. And accept. And just like that, you have your pfSense installed, configured, connected, and already providing connectivity. We can prove it by going into, I don't know, cnn.com. Bingo. We have internet already up and running. Our pfSense installation mission is now complete.

So if that's all you were hoping to do, you can just stop watching this video right now because mission accomplished. But there is one more thing that I want to do, and that, and that is to install the Proxmox equivalent of VMware VM tools. So that's the only thing I have found to be more cumbersome than installing open-vm-tools because there isn't any pre-curated package that you can just install in the package manager. It is a more manual process, but again, you only need to do it once if you want to do it.

So in order to start the process, what we'll need to do is go back to our Proxmox host and to our pfSense console. Click on enter until you get to this main menu again, and select eight for shell. Great. Now I have the commands already in my notepad, of course, I will add them to the description of this video. But the first command will be this one: `pkg install qemu-guest-agent`. So `pkg install qemu-guest-agent`. Enter. All right, so the download and installation is done. All right, so the, the next thing we need to do is to type `vi /etc/rc.conf.local`. Click on I to start editing and add these two lines right here. Colon WQ. And now let's make sure that our work is saved. So let's click on `cat /etc/rc.conf.local` and we see our, our lines are right here. So that's great.

All right guys, so I actually had to go back to my file because I forgot to, to add this ending quote right here. So I'm going to add them right now. All right, so now that I have the ending quote, I can colon WQ. Next thing that you need to do is in the pfSense web interface, go into package manager, available packages, search for shell. You'll find shellcmd. Install it. Great. Now in services, go to shellcmd. Click on add. The command will be `service qemu-guest-agent start`. Shellcmd type will be early shellcmd. Click on save. And now go to diagnostics, reboot, submit. pfSense will now reboot, and hopefully, once it goes back up again, we will have QEMU guest agent running. I'm going to pause the recording right here and resume it once this is done.

All right, so now pfSense has rebooted, and we can see that we have an IP visible in the Proxmox web interface, meaning that the QEMU agent has started and it's now communicating from the guest to the host, which is great. Again, not a very user-friendly kind of process, but you only have to do it once, and it's rock solid.

So guys, this was my take on installing pfSense as a virtual machine on Proxmox. I hope you guys liked it. If you liked it, please give this video a like. It will help me a lot, and I will see you all in the next video. Bye.

[Music] Everyone.