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

ipv4/ipv6 field validation, cannot untick ipv6, ... #66

Closed
ethaniel86 opened this issue Dec 30, 2020 · 10 comments
Closed

ipv4/ipv6 field validation, cannot untick ipv6, ... #66

ethaniel86 opened this issue Dec 30, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@ethaniel86
Copy link

ethaniel86 commented Dec 30, 2020

built wg-manager image from latest source today 5th Jan 2021. Few things won't work

  1. ip4/6 field validation is incorrect. I have to input 10.x.x.x/24 instead of 10.x.x.x, otherwise it won't let me proceed.
  2. cannot disable ipv6, if disabled container logs will throw error, then redirected to login page. Could be related to issue (1)
    Error: sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed: server.v6_subnet
@ethaniel86 ethaniel86 changed the title as central manager for multiple wireguard server ipv4/ipv6 field validation, cannot untick ipv6, ... Jan 5, 2021
@perara perara added the bug Something isn't working label Jan 18, 2021
@AlexanderAllmendinger
Copy link

I'm having the same issue. Because I need to put x.x.x.x/xx into the "IPv4 Address" and the "IPv6 Address" fields, while also specifying the Subnet in the Subnet dropdowns, it results in making calls while specifying the IP parameter like "x.x.x.x/xx/xx" e.g. in "ip link add wg0 .... -4 address add x.x.x.x/xx/xx ..." which makes the calls fail. Is there any work around how I can modify the stored addresses or subnet information to get it working?

@perara perara closed this as completed in cc43a9c Jan 22, 2021
@perara
Copy link
Owner

perara commented Jan 22, 2021

@AlexanderAllmendinger I've added a migration that should enable nullable on v6_subnet. Does this fix your problem?
@ethaniel86 I suppose the latest version should fix your issue

@AlexanderAllmendinger
Copy link

AlexanderAllmendinger commented Jan 22, 2021

man you're fast ... thanks for getting back that quick
Unfortunately this didn't do the trick. I'm no web development expert but looking at your commit it looks like you are now allowing that the subnet fields are not set and therefore null.
What I'm trying is creating a new configuration with default parameters (see screenshot). But even with default parameters the validation of the IP addresses for v4 and v6 are failing and therefore I cannot safe the configuration. Once I'm adding a /24 to the ip address fields, the validation works but the IP address is stored with 10.0.200.1/24/24 and therefore any follow up usage fails.

I hope this helps with understanding my issue.
WireGuardScreenshot

@perara
Copy link
Owner

perara commented Jan 22, 2021

@AlexanderAllmendinger hopefully it is not working in the latest update

@AlexanderAllmendinger
Copy link

I just gave it another try, unfortunately still no luck...
The validation still blocks entering only an IP Address. I hope I'm not missing a step. I basically pull your commits from the github project and then rebuild the frontend, backend and start the server. But I think that should work...

Anyway, when I'm entering only an IP, the validation is still failing and the field is marked red:
_AddWireGuardOnlyIp
The result of this failed validation is that the "Add Server" button is blocked:
_AddWireGuardBlockedAddServer
When I then add the /24 to the IP Address the validation succeeds:
_AddWireGuardIpAndSubnet
Then I can add the server:
_AddWireGuardAllowedAddServer
But still the stored address is wrong as it has the Subnet mask twice:
_AddWireGuardIpAndSubnetBadAddress

@perara
Copy link
Owner

perara commented Jan 22, 2021

I'm not able to replicate this. Are you building master branch?

a

then clicking "add server" works fine here:
b

@perara
Copy link
Owner

perara commented Jan 22, 2021

Worth mentioning that it is indeed a bug that you can add subnet in that field.

@AlexanderAllmendinger
Copy link

Yes, I'm building the master branch and I can see you latest update in the history of my local repository ... but still to me the behavior didn't change yet. Are there any cache files I need to delete?

@perara
Copy link
Owner

perara commented Jan 22, 2021 via email

@AlexanderAllmendinger
Copy link

Ok, I don't know what is being cached but there was something cached. I created a new system and now it works fine. Thanks for the fast responses and fix!
You take care and stay well!

m4xx1m added a commit to m4xx1m/wg-manager that referenced this issue Oct 16, 2022
m4xx1m added a commit to m4xx1m/wg-manager that referenced this issue Oct 16, 2022
m4xx1m pushed a commit to m4xx1m/wg-manager that referenced this issue Oct 16, 2022
m4xx1m pushed a commit to m4xx1m/wg-manager that referenced this issue Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants