Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Firewall optimisation and aliases
« previous
next »
Print
Pages: [
1
]
Author
Topic: Firewall optimisation and aliases (Read 1174 times)
clarknova
Full Member
Posts: 101
Karma: 6
Firewall optimisation and aliases
«
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?
Type: Host; Content: 192.168.1.2, 192.168.1.3
Type: Network; Content: 192.168.1.2/31
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?
Type: Host; Content: 192.168.1.1, 192.168.1.2, 192.168.1.3, 192.168.1.4
Type: Network; Content: 192.168.1.1, 192.168.1.2/31, 192.168.1.4
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.
Logged
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: Firewall optimisation and aliases
«
Reply #1 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
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Firewall optimisation and aliases