Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on startup for Wireguard route add #7457

Open
2 tasks done
0xShkk opened this issue May 15, 2024 · 7 comments
Open
2 tasks done

Error on startup for Wireguard route add #7457

0xShkk opened this issue May 15, 2024 · 7 comments
Labels
support Community support

Comments

@0xShkk
Copy link

0xShkk commented May 15, 2024

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

I have configured OPNsense to use a Wireguard tunnel for accessing certain ressources on an internal network as described in this setup guide: https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html. It explicitely mentions:

The IP you choose for the Gateway is essentially arbitrary; pretty much any unique IP will do. The suggestion here is for convenience and to avoid conflicts

So what I did, was not to use an IP 1 number below my Tunnel IP but an completely arbitrary one that is used nowhere else in my setup.

To Reproduce

  1. Setup Wireguard tunnel as described here:
    https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html

  2. If your Wireguard Tunnel IP is 10.13.0.44/32 for example, use 192.168.252.1 as the Gateway address for the Wireguard Gateway.

  3. Observe errors on OPNsense startup in the Wireguard logs, because the IF address of the pseudo Gateway cannot be added.

Expected behavior

No errors in the logs.

Relevant log files

Following is not cut, the output is really empty. Even checked it in the lates.log file on disk.

Error | wireguard | /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: The  command '/sbin/route -q -n add '-4' '192.168.252.1' -iface 'wg0''  returned exit code '1', the output was ''

Additional context

It is important to note that the selective routing through the Wireguard Tunnel works. Everything is fine out of a connectivity view. But I get those error messages on OPNsense startup constantly and I fear it might become a problem with future releases.

Environment

OPNsense 24.1.6 (amd64).

@fichtner
Copy link
Member

A route probably already exists? Did you check "far gateway" ?

@fichtner fichtner added the support Community support label May 15, 2024
@0xShkk
Copy link
Author

0xShkk commented May 15, 2024

Yes, far gateway is ticked :)

@fichtner
Copy link
Member

Hmm, why? The route appears to be set by WireGuard itself.

@0xShkk
Copy link
Author

0xShkk commented May 16, 2024

Because it is mentioned in the setup guide. I have disabled this now for testing purposes. Same errors on reboot occur.

@fichtner
Copy link
Member

It's difficult to help here within community scope because the error is just a side effect and has no impact on the setup. I'm not sure what you expect or if everything is set up correctly either. I'd like to have a clear traceable operational issue?

@0xShkk
Copy link
Author

0xShkk commented May 16, 2024

I totally understand and I am thankful for your fast responses. Just wanted to make aware of it as it really has no impact on the operational state currently. Just thought it may is a logic bug in OPNsense itself as I have done everything exactly as described in the setup guide.

@0xShkk
Copy link
Author

0xShkk commented May 16, 2024

I can provide you with more details if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Community support
Development

No branches or pull requests

2 participants