OPNsense Forum

English Forums => General Discussion => Topic started by: Zugschlus on February 27, 2026, 01:29:19 PM

Title: Implicit __optX_network and __optX_address
Post by: Zugschlus on February 27, 2026, 01:29:19 PM
Hi,
I would like to query for some background information about the __optX_network and __optX_address objects/aliases/thingies. They are either inconsistently handled in the Web UI or I am missing something in my limited Knowledge.

Here is what I know:


I would appreciate if someone could elaborate on this or maybe even lead me towards existing documentation, or maybe even issues (in the case that I am correct and that OPNsense indeed handles this suboptimally).

In the current state of me not understanding and not finding documentation, those automatic network objects add confusion while being of quite limited usefulness for me.

Greetings
Marc
Title: Re: Implicit __optX_network and __optX_address
Post by: Patrick M. Hausen on February 27, 2026, 01:32:44 PM
Quote from: Zugschlus on Today at 01:29:19 PMI also cannot see which addresses __optX_address expands to. What happens to that object when I have multiple IP addresses and/or virtual IP addresses no the Interface? Can I rely on that object always being correct?

The firewall alias "FOO address" resolves to *all* addresses assigned to interface FOO.

For general manageability you are supposed to use the "LAN address", "LAN network", "FOO address" etc. aliases not the internal __opt_something ones. I don't know why they are even exposed other than "historical artefact".

HTH,
Patrick

Title: Re: Implicit __optX_network and __optX_address
Post by: Maurice on February 27, 2026, 03:07:03 PM
When used in firewall rules, OPNsense itself doesn't expand these _network / _address aliases at all.

Have a look at Firewall: Diagnostics: Statistics: rules. If you selected an _address or _network alias in a firewall rule, it turns into something like vtnet1:2 or vtnet0:network:1 in the resulting pf rules.

Cheers
Maurice