26.1.X Wireguard - add net default: gateway Invalid argument

Started by systeme, Today at 09:20:23 AM

Previous topic - Next topic
Hello,

Since upgrading to version 26.1.2 (or 26.1.7), we've been seeing this error in the WireGuard logs at startup:

2026-04-21T07:59:30
Error
wireguard
/usr/local/opnsense/scripts/wireguard/wg-service-control.php: The command </sbin/route add -'inet' default 'IP_WAN_GATEWAY'> returned exit code 1 and the output was "add net default: gateway IP_WAN_GATEWAY fib 0: Invalid argument"

Configuration IP_WAN_GATEWAY :



The priorities on the gateways have been changed since the last changelog (26.1.2), but the same errors persist.



Opnsense is virtualized, so there are no groups to configure at the gateway level.

Do you have any suggestions on how to avoid this error in the future?

Thank you in advance,

Best regards,