After upgrading pfSense from 22.05 to 23.01, some users report that OpenVPN tunnels fail to establish with a “Cannot open TUN/TAP dev /dev/tun*: No such file or directory” error. I, too, ran full speed into this issue during what initially looked like it should have been a relatively straight-forward upgrade. In my case, I got that error soon after “Peer Connection Initiated” for a case where the pfSense instance acts as an OpenVPN client.

One reason why this can happen is because under some conditions, the linker.hints file isn’t refreshed to match an upgraded kernel. Since the upgrade from 22.05 to 23.01 includes an upgrade from FreeBSD 12 to FreeBSD 14 as the underlying operating system, naturally the kernel is also upgraded.

To fix this in the short term, one can use the web interface command line tool (found as Diagnostics > Command Prompt in the menu) to manually regenerate the linker.hints file by running the command:

kldxref /boot/kernel

and rebooting the instance. This is suggested by Netgate employee stephenw10, and several affected users have subsequently confirmed in that forum thread that doing so solved the problem. It also solved the problem for me.

Supposedly a fix to automatically regenerate the linker.hints file on each reboot will be included in the next scheduled pfSense update, which will very likely be 23.05.

It’s just too bad that this still isn’t mentioned in the 23.01 release notes and errata, which is where information about this type of potential issues should be collected. That way, users wouldn’t have to go digging around the forums after the fact when they are hit by an already-known issue.