OPNsense Forum

English Forums => General Discussion => Topic started by: pfry on November 25, 2025, 04:34:27 PM

Title: FIB/VRF support in OPNsense
Post by: pfry on November 25, 2025, 04:34:27 PM
There have been a few discussions of this in the fora; I didn't see any relevant github requests.

Would anyone be up for FIB/VRF support?

It could be implemented pretty simply. As with many OPNsense features, you could use VRFs/FIBs to really screw yourself up. But I think the feature would be quite usable. The beauty is that default behavior would not change in any meaningful sense, and it could be tested to a considerable extent without (GUI) implementation.

Details:

Possible kernel compile option: "options ROUTETABLES=n". Apparently the standard kernel can be configured (using "net.fibs", as below) for at least n=2. Appropriate setting? I imagine it would depend on impact, if any.

System:

Interfaces:

Firewall:

I've likely missed (quite) a few... e.g. "fib" for ping, trace.

Possible caveat: "route" may be fussy with fib > 0 - it might require an "up" interface in the fib in order to add routes. I'm not sure if this is a non-default behavior, as I haven't tested it.
Title: Re: FIB/VRF support in OPNsense
Post by: pfry on November 25, 2025, 05:43:59 PM
Forgot to mention: frr. Should support fibs; I haven't used it.
Title: Re: FIB/VRF support in OPNsense
Post by: AdSchellevis on November 26, 2025, 09:00:11 AM
Not at all easy to integrate (lots of moving parts), FRR by my knowledge doesn't support fibs either (e.g. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229136), only bird does as far as I know.

Best regards,

Ad
Title: Re: FIB/VRF support in OPNsense
Post by: bimbar on November 26, 2025, 12:05:38 PM
I also think that VRFs are not that useful in firewalls - in routers, yes, but firewalls are supposed to connect different routing contexts, not to separate them.
Title: Re: FIB/VRF support in OPNsense
Post by: pfry on November 26, 2025, 02:55:33 PM
Quote from: AdSchellevis on November 26, 2025, 09:00:11 AMNot at all easy to integrate (lots of moving parts)[...]

In context I wouldn't consider it particularly difficult, but it's not basic. Identifying all of the affected elements would be a pain, especially if they're not well encapsulated (as nobody does that).

Quote from: bimbar on November 26, 2025, 12:05:38 PMI also think that VRFs are not that useful in firewalls[...]

I'd disagree there. But I will grant that it's a bit of a niche feature, and not popular with the OPNsense base. Part of the reason for that is that for most scenarios rule-based forwarding would work about as well; another part is the chicken/egg problem, but that merely partially contextualizes the lack of demand. From a cost-benefit value standpoint it looks pretty dead.
Title: Re: FIB/VRF support in OPNsense
Post by: Fredouil on December 27, 2025, 11:44:41 AM
Hello, I disagree with this analysis. I've lost count of the number of discussions where professionals say that if OPNsense supported VRF, they would immediately switch to that solution. I know many professionals who are reluctantly forced to turn to Fortinet, VYOS, or others because they have VRF or VDOM. I truly believe it would be a huge mistake to think this feature isn't important; it should be a priority. I'm giving you my analysis as an expert and professional who regularly meets with other professionals at trade shows.
Title: Re: FIB/VRF support in OPNsense
Post by: pfry on December 29, 2025, 06:34:16 PM
Quote from: Fredouil on December 27, 2025, 11:44:41 AM[...]it should be a priority[...]

Heh. Whose confirmation bias is justified? (Does that matter?)

I'd implement it, as I come from a routing background. (Note that I started with firewalls at the same time.) I'm a lousy persuader; money talks, but I don't have enough for this one.
Title: Re: FIB/VRF support in OPNsense
Post by: Seimus on January 02, 2026, 03:26:46 AM
Quote from: Fredouil on December 27, 2025, 11:44:41 AMprofessionals say that if OPNsense supported VRF, they would immediately switch to that solution

I agree that having VRF on OPN would be great, VRF or Instances depending on the vendor are widely used on FWs as well. There is a use case for them, and a reason its needed.

But this where "they would immediately switch" "if <PRODUCT> had <this>" is just bollocks. This is the same as listening to a Windows user telling they will switch to Linux if Linux has this or that.

Regards,
S.
Title: Re: FIB/VRF support in OPNsense
Post by: cluck on March 25, 2026, 01:38:04 PM
Multi-WAN stability would greatly improve if 'gateway groups' and WAN interfaces would be implemented on top of dedicated FIBs instead of policy routing.

Such setups are notoriously unstable because connections get bound to the wrong local IP address; this is because "monitoring IP host routes", default routes, static routes and dpinger all fight over the same FIB.

Btw., OPNsense 26.1 just broke Multi-WAN completely... maybe a good occasion to "rethink" this feature without the burden of a migration path.