OPNsense Forum

English Forums => General Discussion => Topic started by: clarknova on July 27, 2021, 11:55:52 PM

Title: Firewall optimisation and aliases
Post by: clarknova on July 27, 2021, 11:55:52 PM
Maybe I'm splitting hairs here, but I don't know, so I'll ask. I have read the OpenBSD documentation and didn't find the answers I'm looking for, and digging into the code would likely leave me more confused.

When creating a firewall alias, is one of these better than the other in terms of economy of processing?

I think for larger networks the intuitive answer is that the latter method is superior, I'm just wondering if the answer changes for a sufficiently small network.

Similarly, does the answer change if I have a mix of hosts and networks?

Maybe a better question would be how OPNsense expands aliases like these when creating actual pf rulesets. Then a person could draw their own conclusions when deciding how to craft their aliases.
Title: Re: Firewall optimisation and aliases
Post by: franco on July 28, 2021, 09:31:09 AM
You can see the table contents from the pfTable diagnostics page. There is also network ranges (IP-IP) and negation (!IP) to play with.

From what I can tell ranges are converted into subnets and stray /32 addresses internally.


Cheers,
Franco