Recent posts

#1
Hi all,
I would like to share a small project and ask for feedback before opening pull requests.

The problem. In Firewall → Log Files → Live View, entries of filter rules carry a rule id, so
the details dialog can link to the rule. NAT entries don't: the dialog shows nat rule
and an internal pf rule number, and finding the responsible outbound NAT rule or port forward means
comparing interfaces, addresses and aliases by hand. The same goes for automatic rules and UPnP
mappings, and pf numbers shift with every ruleset reload, so an older entry may point to a rule
that has moved since.

What I built. Live Rule Navigator, a plugin that adds an "Associated Rule" section to the
details dialog:
  • the configured rule behind the entry, for filter rules, source/destination/one-to-one NAT,
     automatic rules (outbound NAT, anti-lockout, reflection, plugin rules) and UPnP mappings
     (client, ports, lease expiry);
  • its key settings, Open Rule / Open Rule List (new tab, so the live view keeps its filters),
     and a logging toggle with confirmation that saves through the rule's model (config history) and
     is activated with the page's own Apply;
  • NAT entries are resolved through the active ruleset: pfctl -vv -s nat → structural check
     against the logged packet → alignment with the translation lines of /tmp/rules.debug → verbatim match against the text the configured rules generate. Per-reload snapshots keep older entries attributable. Anything ambiguous is flagged and read-only.

Screenshots, details and tests: https://github.com/Brownys/os-liverulenav


What it needs from core. One small extension point in the live log (17 lines): the details
dialog triggers a jQuery event firewall_log_details with the log record and the dialog body, and
the page loads scripts from www/js/diagnostics/fw_log/. Without such scripts nothing changes.

Patch: https://github.com/Brownys/core/compare/master...live-log-extension-point

Questions to the core team:
  • Would you accept such an extension point, or would you prefer a different mechanism (for
     example an existing way to inject plugin scripts into a core page that I missed)?
  • The plugin reads the NAT rules registered by plugins through reflection on the private \OPNsense\Firewall\Plugin::$natRules, to know which plugin page a generated rule belongs to (with a text-only fallback). Would a public getter be acceptable?
  • To record a snapshot after each successful ruleset load, the plugin registers for the rules_source_nat
     hook and contributes no rules. Is there a better "ruleset loaded" signal?
  • Is net the right category, and is a ~3,000 line initial plugin acceptable in one PR, or
     should I split it (filter rules first, then NAT resolution, then snapshots and UPnP)?

Tested on OPNsense 26.7 with IPv4/IPv6, PPPoE WAN, hybrid outbound NAT, port forwards and os-upnp.

Disclosure: the code was written with the help of Claude Code.
I specified the behaviour, reviewed the changes and tested everything on my own firewall.

Thanks for any feedback!
Stephan
#2
General Discussion / Backup Widget on Home Page
Last post by PNG - Today at 02:00:36 AM
I just tried to add a widget to the home screen for backups but found it is not available. I can't speak for anyone else but I thought having immediate access to creating a backup would be a priority.

Can it be done, in absence of an option on the dropdown menu?
#3
While investigating intermittent UPnP discovery issues with an Xbox Series X, I noticed that OPNsense builds miniupnpd with UPNP_IGDV2 enabled, whereas upstream leaves IGDv2 disabled by default due to interoperability concerns.

Environment:
  • OPNsense 26.7.10p2
  • miniupnpd 2.3.11_2,1
  • os-upnp 1.10_1
  • IPv4 UPnP enabled
  • force_igd_desc_v1=yes

Verified observations:
  • Periodic SSDP NOTIFY messages advertise IGDv2 device and service types.
  • Targeted IGDv1 M-SEARCH requests receive matching IGDv1 responses.
  • The HTTP device description advertises IGDv1.
  • The Xbox sends a Microsoft User-Agent, which also triggers the automatic IGDv1 description compatibility mechanism.
  • The current upstream source retains this behaviour.

Packet captures and source code analysis confirm these observations. However, a causal relationship with the intermittent Xbox discovery issues has not yet been established.

Questions:
  • What is the rationale for enabling IGDv2 in the OPNsense package?
  • Are there known interoperability issues with Microsoft or Xbox clients in this configuration?
  • Is there a supported way to obtain a native IGDv1 build of miniupnpd for OPNsense without maintaining a separate build environment?
  • Would an alternative IGDv1 package variant be technically feasible?

The objective is to perform a controlled comparison while retaining the existing OPNsense integration and avoiding unnecessary custom package maintenance.

Thank you.
#4
I don't know how much work the devs would be prepared to do but for the the ideal would be to have both, the potential problem and potential cure.
Optionally enable autosnapshot and a utility to reclaim space by retention policy. That policy would be the user's responsibility to adapt adequately to their storage.
My OPN is a VM with 36 GB of storage. Used capacity is 12 % , currently with 5 BEs but that is df accounting which is incorrect for zfs and what the dashboard shows.
I suspect the same is true for you if you have snapshots an look only at the dashboard.
#5
26.7, 26.10 Series / Re: Pure non-filering bridge
Last post by lmoore - December 05, 2026, 11:41:26 PM
Quote from: Cenkron on December 05, 2026, 07:24:49 PMThis is good, as it allows configuration files to be shared by multiple installed devices.

I suspect there is a way to reconfigure this address within FreeBSD,

If you are going to be sharing configuration files across different devices, your safest option is to add a Tunable setting.

System -> Settings -> Tunables

Search for net.link.bridge.inherit_mac

If found set it to 1. Otherwise, add the tunable and set its value to 1 and leave the description field empty, it will be populated automatically.

Save the setting and reboot. The MAC address of the first member interface will be used as the MAC address of the bridge.


#6
General Discussion / Re: Automatic snapshots before...
Last post by connervt - December 05, 2026, 09:08:21 PM
Just how big are people's configurations and snapshots?

My system has a 256GB NVMe drive that was the very first NVMe I ever bought, an Intel 600P back in 2017.  The Dashboard reports I'm using 2.8GB of it, which is 1%.
#7
General Discussion / Re: Automatic snapshots before...
Last post by subscribe9943 - December 05, 2026, 08:35:17 PM
Quote from: franco on August 13, 2026, 02:23:00 PMPeople ignore it and post here anyway.  It's similar to binding the web GUI to specific interfaces.


Cheers,
Franco

Firstly, I absolutely love Opnsense, and have used it for many years now. Thank you so much for such an amazing project.

Secondly, I completely understand your hesitancy to implement features like this because so many people fail to RTFM, or due any bit of troubleshooting on their own, and then you suffer with the endless questions... That said, I would love to see this feature as well (taking full responsibility for my own snapshot management, cleanup, etc).

Thanks again!
#8
General Discussion / Re: L2TP deprecation/removal
Last post by OliWard - December 05, 2026, 08:01:28 PM
Thank you for considering this, Franco. I'm not quite sure of the exact nuances you're looking at, so here is my current setup:

WAN: Uses PPPoE (IP and gateway are assigned dynamically).
L2TP: Runs over the WAN interface with no local IP specified (gets IPs dynamically, similar to PPPoE).

Here is a screenshot of the L2TP connection: https://imgur.com/a/NrpNdCV

There is an existing issue where the L2TP connection usually fails to connect automatically on boot because the PPPoE interface isn't up yet. As a workaround, I have a simple cron job running every 5 minutes to bring up the L2TP connection if it's down.

Thanks
#9
General Discussion / Re: L2TP deprecation/removal
Last post by franco - December 05, 2026, 07:46:00 PM
Thanks for all the feedback! We decided to only remote PPTP from the PPP support for 27.1 so L2TP keeps working.

However, there is a weirdness in the way L2TP is implemented that we may have to clean up for 27.7 so that it makes more sense. Currently you can assign it to a WAN with DHCP and run L2TP over it, or give the connection a local address that it will set on the parent device which is... weird to say the least.

https://github.com/opnsense/core/blob/c0c9fa7a58109cd12f9160b4ccf1f0f6c9f238ce/src/etc/inc/interfaces.inc#L1126-L1132

So the question is how are users of L2TP in OPNsense setting up their local IPs?


Cheers,
Franco
#10
26.7, 26.10 Series / Re: Scheduled Jobs - Auto Upda...
Last post by franco - December 05, 2026, 07:41:35 PM
I can't see any direct problem and it calls ok from here.  The question is if your health audit is clean?  auto-update is not restricted to specific groups and it's also in the standard firmware backend descriptions so on the surface the error you see makes no sense.


Cheers,
Franco