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

Issue with Adding New Peer: IP Address Already in Use by WireGuard #454

Open
ShaAlexander opened this issue Dec 17, 2024 · 0 comments
Open

Comments

@ShaAlexander
Copy link

Hi,

I'm encountering an issue when trying to add a new WireGuard peer using the wireguard-manager.sh script. Specifically, the script fails with the following errors:

/usr/local/bin/wireguard-manager.sh: line 1500: [: 10.0.0.2: integer expression expected
/usr/local/bin/wireguard-manager.sh: line 1578: 10.0.0.2: syntax error: invalid arithmetic operator (error token is ".0.0.2")

It seems like the script is attempting to use 10.0.0.2 for the new peer, but this IP address is already in use by another WireGuard peer, causing conflicts.

Steps I've taken:

  • Tried adding a new WireGuard peer using the 5 option in the management script.
  • The script attempts to use 10.0.0.2 for the new peer, even though it is already assigned.
  • The script fails because it's performing arithmetic operations on an IP address that is already in use.

What I believe is happening:

The script does not properly check if the IP address is already assigned to another peer. As a result, it tries to reuse an already taken IP address and attempts invalid arithmetic operations on it.

My request:

Could you please advise on how to fix this issue? Is there a way to ensure the script checks for IP address availability before trying to assign a new peer, or is there a workaround to manually assign a unique IP address?

Thank you for your help!

Best regards,
Alex

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

1 participant