Opened 4 years ago

Closed 4 years ago

#1347 closed Bug / Defect (notabug)

max-clients not respected

Reported by: fkooman Owned by:
Priority: major Milestone:
Component: Generic / unclassified Version: OpenVPN 2.5.0 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:


When using max-clients in the server it is not respected. When using _n_ for max-clients, only _n_-1 clients are allowed to connect...

max-clients 5

Netmask: = 29

Address space: Private Use
Hosts/Net?: 6

The IP space has enough room for 5 clients (+1 IP for the "gateway").

Change History (4)

comment:1 Changed 4 years ago by Pippin

-[ipv4 :] - 0

Host address            -
Host address (decimal)  - 183300352
Host address (hex)      - AECF100
Network address         -
Network mask            -
Network mask (bits)     - 29
Network mask (hex)      - FFFFFFF8
Broadcast address       -
Cisco wildcard          -
Addresses in network    - 8
Network range           - -
Usable range            - -

For topology subnet it is: = Network = DHCP = Broadcast
+1 for the server

Addresses in network - 4 = number of clients

comment:2 Changed 4 years ago by tct = DHCP

The address you have designated as DHCP is still a usable IP address.

@fkooman, I have also experienced the exact same issue. The server evaluates --max-clients N to be N - 1. I did not raise a ticket (that I can find) before because I was not sure of the cause, IE. It could have been something I caused myself.

Last edited 4 years ago by tct (previous) (diff)

comment:3 Changed 4 years ago by fkooman

Actually, max-clients *is* respected, the problem is simply that I was expecting that my /29 would allow 5 clients to get an IP from this range and thus I set max-clients to 5. This indeed allows 5 clients to connect, the 5th one will simply not get an IPv4 address, which broke my client-connect script that assumes a valid IPv4 address is presented in the environment variable ifconfig_pool_remote_ip.

comment:4 Changed 4 years ago by tct

Resolution: notabug
Status: newclosed
Note: See TracTickets for help on using tickets.