missing wireguard automatic route

Started by freejack, October 10, 2026, 11:55:12 AM

Previous topic - Next topic
Setting up a new instance and following the Road Warrior tutorial I noticed routing issues for my wg peers (peers get a handshake, but cannot access). And System - Routes - Status did not show a route for the wg interface.

Ignoring the "There is no need to configure IPs on the interface. The tunnel address(es) specified in the Instance configuration for your server will be automatically assigned to the interface once WireGuard is restarted" note from the tutorial and adding the tunnel static ip config for the wg interface as well resolves the issue (route shows up in status, peer can access). While the interface edit dialog rejects an ip config for a tunnel, the assignment dialog allows it, so I entered it there.

I have the same problem. On a freshly installed OPNSense 26.7, the automatic route isn't set either.
If you try to set it manually via the GUI, the following message appears in the log (even though the "Tunnel address" field isn't empty):

ROUTING: refusing to set interface route on addressless opt1(wg0)

My workaround so far is the following command via the shell:

route add -net 192.168.1.0/24 -interface wg0

But this only lasts until the next service or firewall restart.
Even an update to version 26.7.7 didn't fix the problem.

Maybe this information will be helpful.

Quote from: HIT on Today at 04:15:21 PMOn a freshly installed OPNSense 26.7, the automatic route isn't set either.
How about some screenshots? You both are new to the forum and probably OPNsense. No one else is reporting any problem, so it will be layer 8, I guess.

Quote from: freejack on October 10, 2026, 11:55:12 AMWhile the interface edit dialog rejects an ip config for a tunnel, the assignment dialog allows it, so I entered it there.
That is how you do it in OPNsense.

Quote from: Bob.Dig on Today at 06:09:10 PM
Quote from: freejack on October 10, 2026, 11:55:12 AMWhile the interface edit dialog rejects an ip config for a tunnel, the assignment dialog allows it, so I entered it there.
That is how you do it in OPNsense.

Nope, see the linked road warrior tutorial in my original post. There IPv4 and IPv6 config is documented as "none" for interface assignment in step 4(a). That's leading to missing route. Deviating from the docs and using a static IPv4 config there, with the tunnel's IPv4 settings replicated, leads to a working config.