<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Pfsense on inherent site</title>
		<link>https://inherently.xyz/tags/pfsense/</link>
		<description>Recent content in Pfsense on inherent site</description>
		<generator>Hugo</generator>
		<language>en-us</language>
			<lastBuildDate>Tue, 20 Sep 2022 01:12:49 +0300</lastBuildDate>
			<atom:link href="https://inherently.xyz/tags/pfsense/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Virtualized pfSense on ProxMox</title>
				<link>https://inherently.xyz/blog/virtualized-pfsense/</link>
				<pubDate>Tue, 20 Sep 2022 01:12:49 +0300</pubDate>
				<guid>https://inherently.xyz/blog/virtualized-pfsense/</guid>
				<description>&lt;p&gt;Recently I went down the path of running my router inside a virtual machine.&#xA;This is far from the first time I&amp;rsquo;ve tried it but it is the first time I have a solid long-term plan.&#xA;Keep reading if you&amp;rsquo;re interested in doing something similar, this should be fun.&lt;/p&gt;&#xA;&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;&#xA;&lt;p&gt;Last time I ran my router inside of a virtual machine was in 2017 and it &lt;a href=&#34;https://passthroughpo.st/using-vfio-turn-destkop-router/&#34;&gt;was documented in this article&lt;/a&gt;.&#xA;The reason, at least as far as I can tell, that it didn&amp;rsquo;t stick is because I ran it on my desktop.&#xA;Since then, I started my homelab where I can run software on machines that are online most of the time.&#xA;A small Dell Optiplex is more than enough for my networking needs at this time and I have two of them.&#xA;I picked the weaker one since it isn&amp;rsquo;t as useful for quickly spinning up and down VMs due to the old CPU.&#xA;My plan is to run some LXC containers and KVM virtual machines alongside pfSense which is why I&amp;rsquo;m virtualizing it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;preparation&#34;&gt;Preparation&lt;/h2&gt;&#xA;&lt;p&gt;The ProxMox installation on the weak Optiplex is configured the same as the main one for testing purposes.&#xA;When using the system as a staging environment, I installed it using ZFS.&#xA;This was a great choice for having a 1-to-1 copy of the production version but it uses a little bit more RAM than I&amp;rsquo;m willing to spare.&#xA;Due to unfortunate circumstances it&amp;rsquo;s equipped with only 20GB of memory and using more than 2gb of that for the host limits what other things can run at the same time on it.&#xA;With that in mind I chose to reinstall using the default LVM scheme.&#xA;After the installation I followed the &lt;a href=&#34;https://pve.proxmox.com/wiki/Pci_passthrough&#34;&gt;official PCI passthrough guide&lt;/a&gt; and rebooted.&lt;/p&gt;&#xA;&lt;h2 id=&#34;pfsense-vm-setup&#34;&gt;PfSense VM Setup&lt;/h2&gt;&#xA;&lt;p&gt;Since I have 2 identical Realtek NICs but different revisions, I looked through the output of &lt;code&gt;lspci -vvvv&lt;/code&gt; to identify the correct one.&#xA;With the device ID noted, I created a q35 UEFI-enabled virtual machine and made sure to uncheck the &lt;code&gt;Pre-Enroll keys&lt;/code&gt; option (that one took a while to figure out).&#xA;Don&amp;rsquo;t forget to set the option &lt;code&gt;Start at boot&lt;/code&gt; to make it operate as if it was a bare-metal installation.&#xA;The installation process is very streamlined so I was up and running very quickly.&#xA;I had to do a little dance of plugging/unplugging cables to my switch and assign a spare VLAN to a port for setup purposes but once that was done I uploaded the backup config.&#xA;Reassigning interfaces and VLANs was a bit tedious however the whole thing didn&amp;rsquo;t take more than 20-30 minutes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;results&#34;&gt;Results&lt;/h2&gt;&#xA;&lt;p&gt;The performance isn&amp;rsquo;t any worse and reliability is somehow increased despite the old box using an Intel NIC and the new one using Realtek.&#xA;As far as consolidation goes, this is a huge increase and I can now run multiple other things on a single machine without relying on pfSense packages.&lt;/p&gt;&#xA;</description>
			</item>
	</channel>
</rss>
