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

Please do not prevent IP Allocation with IP addresses outside of the Wireguard subnet #560

Open
shawly opened this issue Mar 16, 2024 · 1 comment

Comments

@shawly
Copy link

shawly commented Mar 16, 2024

I have Site2Site connection from my server to a Fritzbox. The Fritzbox does have a custom Wireguard implementation without any transfer networks which means I need to allocate the Fritzboxes OWN IP instead of an IP from my wg network.

When I try to set the IP Allocation to the IP of the Fritzbox, Wireguard UI prevents me from saving this configuration with the error "IP 192.168.178.1 does not belong to any network addresses of WireGuard server".

While I find it ok to warn a user from a possible misconfiguration, I do not think that the UI should prevent saving this configuration since it is indeed a valid config for this use case. So this should be changed from error level to warning level.

I know I can just change the IP in the final config but in cases where I didn't have to manage my Wireguard stuff it is easy to forget things like this so I'd like to have Wireguard UI produce valid and ready to use confs instead of having to edit them after downloading.

This seems to be the line of code:

if isValid {

@gnat
Copy link

gnat commented Apr 20, 2024

Yup I always get hung up on this too, it kinda ruins the wireguard-ui UX unless you know exactly what you're doing.

In my case Address= needs to be 10.10.10.1/24 not 10.10.10.1/32 or wireguard-ui won't let you add clients. I just add both addresses to the server interface as a workaround (even though 10.10.10.1/24 is wrong, I don't think wireguard cares, which is nice).

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

No branches or pull requests

2 participants