Fix most Realtek issues on pfSense

Introduction
I run a homelab at home, and every time I’ve had to reinstall pfsense I’ve always had the same issue and had to search on Google for ages. So I’m mainly writing this for myself.
I have pfsense installed on a Dell Wyse 5070 with a second Realtek RTL8111F PCIE M.2 NIC I bought from Aliexpress. It works great though!
The main issue or problem I had is that I had to reassign the pfsense interfaces on every reboot. And I would bash my head against the wall trying to figure out why.
This meant that every time the power went out or a reboot happened, I had to physically go to my pfsense server, plug in a monitor and a keyboard and reassign the interfaces. Whish is a pain in the 🍑.
The issue
The issue is that the Realtek NIC doesn’t really want to cooperate with some other hardware, so on every reboot the pfsense box loses track of what the interfaces are.
How to fix It
Hopefully there is a simple fix for this:
- Ensure this is your issue, that is, do you have a Realtek NIC?
- SSH or physically go to your pfsense box and go into the shell (option 8)
- Download the latest realtek drivers:
pkg install realtek-re-kmod
- Create the file
/boot/loader.conf.local
:
nano /boot/loader.conf.local
Note:
If you don’t have
nano
installed, you can install it withpkg install nano
.
Note 2:
Once you install the realtek drivers, it will tell you to add two lines to the
/boot/loader.conf
file. We create a new file called/boot/loader.conf.local
instead because sometimes pfsense will override the changes we make to the/boot/loader.conf
file.
- Add the following lines to the file:
if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"
- Reboot pfsense:
reboot
- Check that the installation was successful after rebooting:
kldstat
When running kldstat
you should see if_re.ko
somewhere in the output. This means that the installation was successful.
Troubleshooting
The only issue I ever had was when I installed everything and couldn’t see if_re.ko
in the output of kldstat
.
This was because I made a typo when adding the lines to the /boot/loader.conf.local
file, so triple check that’s alright.