You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue 1: The API allowed me to create more than 254 clients. The CONNECTING_CLIENT_LIMIT does not actually limit this. For a `/24' network, there should be 256 total addresses and 254 allocable addresses (addresses we can assign to server and clients). API should raise an error when user reaches limit. Current behaviour: API continues to create clients.
Issue 2: API does not release IP addresses of deleted users. I created 254 clients, then deleted 250 and created 5 more. Instead of freeing IP addresses from 10.8.0.0/24, the API continues to lease addresses from the following /24 network 10.8.1.0/24. It caused newly created users with 10.8.1.0/24 addresses to be unable to communicate properly.
Also I would suggest to deprecate CONNECTING_CLIENT_LIMIT variable and include it in WG_DEFAULT_ADDRESS.
The value of WG_DEFAULT_ADDRESS should look like network in format 10.8.0.0/24 from which we can calculate server IP and the maximum number of clients.
Version
v2.2.3
Relevant log output
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
@alekseikulik The fix will be included in the next release. When the limit is reached, the server will return a 500 error. It is not processed by the application in case you want to connect sentry for such cases. Also, when clients are deleted, their addresses become free for new clients.
What happened?
Dear @leonovk! First of all, thank you for this great API server!
I have
wg-rest-api
deployed on a server as Docker container with default IP settings:Issue 1: The API allowed me to create more than 254 clients. The
CONNECTING_CLIENT_LIMIT
does not actually limit this. For a `/24' network, there should be 256 total addresses and 254 allocable addresses (addresses we can assign to server and clients). API should raise an error when user reaches limit. Current behaviour: API continues to create clients.Issue 2: API does not release IP addresses of deleted users. I created 254 clients, then deleted 250 and created 5 more. Instead of freeing IP addresses from
10.8.0.0/24
, the API continues to lease addresses from the following/24
network10.8.1.0/24
. It caused newly created users with10.8.1.0/24
addresses to be unable to communicate properly.Also I would suggest to deprecate
CONNECTING_CLIENT_LIMIT
variable and include it inWG_DEFAULT_ADDRESS
.The value of
WG_DEFAULT_ADDRESS
should look like network in format 10.8.0.0/24 from which we can calculate server IP and the maximum number of clients.Version
v2.2.3
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: