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 October 14, 2026, 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 October 14, 2026, 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.

October 14, 2026, 08:06:24 PM #4 Last Edit: October 14, 2026, 09:34:51 PM by Bob.Dig
Quote from: freejack on October 14, 2026, 07:01:43 PMThat's leading to missing route.
Show some screenshots of your WG config and the routes. I bet, it is there.

 Don't Disable routes on the instance.

Here is how it looks:

wg instance has route. But only when route is replicated on interface assignment it is actually created. And wg peers can access.

Otherwise it is missing. And wg peers cannot reach other segments.

October 14, 2026, 09:18:50 PM #6 Last Edit: October 14, 2026, 09:45:16 PM by Bob.Dig
Quote from: freejack on October 14, 2026, 09:13:35 PMOtherwise it is missing.
Show your instance config in detail. It looks like you Disabled routes.

Looking at my own screenshot, I thought: I can do better.
And I did.

Even if I Disable routes, I still have the WG-instance. So it looks like you have a problem indeed. 


I made a new WG-instance, still no problem here. So something messed up your OPNsense, it looks like.