Hi all,
Is this known, and is it expected? I've found that Zenarmor adds an MTU override to my WireGuard interface assignment. It has happened twice now, and the configuration history shows it was Zenarmor that did it.
Setup
- OPNsense 26.7.9_3 (FreeBSD 15.1), amd64
- Zenarmor in routed mode (emulated netmap)
- WireGuard road-warrior instance on wg1, assigned as an interface. wg1 is one of the interfaces Zenarmor protects.
- The interface assignment had no MTU set. WireGuard's default is 1420.
What happens
System > Configuration > History shows a run of revisions, all by "(root) /usr/local/opnsense/mvc/app/library/OPNsense/Zenarmor/CLI.php made changes". In the same run, Zenarmor recreates its netmap tunables (dev.netmap.if_num, dev.netmap.ring_size) and its "Zenarmor periodicals" cron job, all with new UUIDs, and adds this to the WireGuard interface:
<opt2>
...
<spoofmac/>
+ <mtu>1500</mtu>
</opt2>
1) 13 Nov, during an OPNsense firmware upgrade (26.7.9_1). After the reboot, wg1 came up with MTU 1500 instead of 1420. Clearing the MTU on the interface page fixed the config, but the live interface stayed at 1500 until I set MTU 1420 explicitly on the WireGuard instance and applied it, which recreated wg1.
2) 22 Nov at 00:01, with nobody logged in and no firmware update. The same sequence of about 16 CLI.php revisions ran, and it wrote <mtu>1500</mtu> back onto the WireGuard interface. This time the live wg1 stayed at 1420, because the interface wasn't recreated. The override would have taken effect at the next WireGuard restart or reboot. I'm not sure which setting wins when both the instance MTU and the interface MTU are set.
Why it matters
WireGuard needs room for its ~60-80 bytes of encapsulation overhead. Forcing the tunnel interface to 1500 causes fragmentation or blackholed large packets for clients. This is easy to miss, because the change only takes effect at the next WireGuard restart or reboot, possibly days later.
Questions
1. Why does Zenarmor set an MTU on interfaces it protects? Is it meant to copy the current MTU, and does it fall back to 1500 for tun/wg interfaces?
2. What runs CLI.php at 00:01 unattended? An auto-update, a periodic reinit or a scheduled job? Can I see that in a log?
3. Can it be told to leave the interface MTU alone, or keep the existing value? Or is there a fix planned?
Workaround for now: after any Zenarmor update or reinit, check Interfaces > [your WG interface] and clear the MTU field. Also set the MTU explicitly (e.g. 1420) on the WireGuard instance under VPN > WireGuard > Instances. Then check the live value with ifconfig wg1.
To check whether it has happened to you:
- System > Configuration > History: look for Zenarmor/CLI.php revisions and diff them against the revision before them.
- Or: grep -A20 '<if>wg' /conf/config.xml | grep mtu
Thanks!