Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

For a multiclient OpenVPN configuration, as we can find from the relevant documentation (server.conf comments),

Configure server mode and supply a VPN subnet for OpenVPN to draw client addresses from. The server will take 10.8.0.1 for itself, the rest will be made available to clients. Each client will be able to reach the server on 10.8.0.1.

server 10.8.0.0 255.255.255.0

So, as we understand, we are actually assigning a pool 256 addresses, the first usable address being 10.8.0.1 and the last usable should be 10.8.0.254. Among these, the first of the addresses (10.8.0.1) will be assigned to the server, as already made explicit in the above text.

Also, in the client configuration file, we find something like,

The hostname/IP and port of the server. You can have multiple remote entries to load balance between the servers.

remote my-server-1 1194

Where, the last line, as I deduce, should be written as,

remote 10.8.0.1 1194

in order to match with the server address.

(This statement is not correct, see this answerthis answer.)

Now, my question is, which algorithm does the sever follow in order to assign addresses to the client from the pool of available addresses (10.8.0.2-10.8.0.254)?

Is it something like that the first client gets the .2 address, the next one .3 address? Or is it that addresses are assigned at random? Or is it something else, if it is .5, 9., why is it like that?

For a multiclient OpenVPN configuration, as we can find from the relevant documentation (server.conf comments),

Configure server mode and supply a VPN subnet for OpenVPN to draw client addresses from. The server will take 10.8.0.1 for itself, the rest will be made available to clients. Each client will be able to reach the server on 10.8.0.1.

server 10.8.0.0 255.255.255.0

So, as we understand, we are actually assigning a pool 256 addresses, the first usable address being 10.8.0.1 and the last usable should be 10.8.0.254. Among these, the first of the addresses (10.8.0.1) will be assigned to the server, as already made explicit in the above text.

Also, in the client configuration file, we find something like,

The hostname/IP and port of the server. You can have multiple remote entries to load balance between the servers.

remote my-server-1 1194

Where, the last line, as I deduce, should be written as,

remote 10.8.0.1 1194

in order to match with the server address.

(This statement is not correct, see this answer.)

Now, my question is, which algorithm does the sever follow in order to assign addresses to the client from the pool of available addresses (10.8.0.2-10.8.0.254)?

Is it something like that the first client gets the .2 address, the next one .3 address? Or is it that addresses are assigned at random? Or is it something else, if it is .5, 9., why is it like that?

For a multiclient OpenVPN configuration, as we can find from the relevant documentation (server.conf comments),

Configure server mode and supply a VPN subnet for OpenVPN to draw client addresses from. The server will take 10.8.0.1 for itself, the rest will be made available to clients. Each client will be able to reach the server on 10.8.0.1.

server 10.8.0.0 255.255.255.0

So, as we understand, we are actually assigning a pool 256 addresses, the first usable address being 10.8.0.1 and the last usable should be 10.8.0.254. Among these, the first of the addresses (10.8.0.1) will be assigned to the server, as already made explicit in the above text.

Also, in the client configuration file, we find something like,

The hostname/IP and port of the server. You can have multiple remote entries to load balance between the servers.

remote my-server-1 1194

Where, the last line, as I deduce, should be written as,

remote 10.8.0.1 1194

in order to match with the server address.

(This statement is not correct, see this answer.)

Now, my question is, which algorithm does the sever follow in order to assign addresses to the client from the pool of available addresses (10.8.0.2-10.8.0.254)?

Is it something like that the first client gets the .2 address, the next one .3 address? Or is it that addresses are assigned at random? Or is it something else, if it is .5, 9., why is it like that?

added 54 characters in body
Source Link
Masroor
  • 305
  • 2
  • 3
  • 12

For a multiclient OpenVPN configuration, as we can find from the relevant documentation (server.conf comments),

Configure server mode and supply a VPN subnet for OpenVPN to draw client addresses from. The server will take 10.8.0.1 for itself, the rest will be made available to clients. Each client will be able to reach the server on 10.8.0.1.

server 10.8.0.0 255.255.255.0

So, as we understand, we are actually assigning a pool 256 addresses, the first usable address being 10.8.0.1 and the last usable should be 10.8.0.254. Among these, the first of the addresses (10.8.0.1) will be assigned to the server, as already made explicit in the above text.

Also, in the client configuration file, we find something like,

The hostname/IP and port of the server. You can have multiple remote entries to load balance between the servers.

remote my-server-1 1194

Where, the last line, as I deduce, should be written as,

remote 10.8.0.1 1194

in order to match with the server address.

(This statement is not correct, see this answer.)

Now, my question is, which algorithm does the sever follow in order to assign addresses to the client from the pool of available addresses (10.8.0.2-10.8.0.254)?

Is it something like that the first client gets the .2 address, the next one .3 address? Or is it that addresses are assigned at random? Or is it something else, if it is .5, 9., why is it like that?

For a multiclient OpenVPN configuration, as we can find from the relevant documentation (server.conf comments),

Configure server mode and supply a VPN subnet for OpenVPN to draw client addresses from. The server will take 10.8.0.1 for itself, the rest will be made available to clients. Each client will be able to reach the server on 10.8.0.1.

server 10.8.0.0 255.255.255.0

So, as we understand, we are actually assigning a pool 256 addresses, the first usable address being 10.8.0.1 and the last usable should be 10.8.0.254. Among these, the first of the addresses (10.8.0.1) will be assigned to the server, as already made explicit in the above text.

Also, in the client configuration file, we find something like,

The hostname/IP and port of the server. You can have multiple remote entries to load balance between the servers.

remote my-server-1 1194

Where, the last line, as I deduce, should be written as,

remote 10.8.0.1 1194

in order to match with the server address.

Now, my question is, which algorithm does the sever follow in order to assign addresses to the client from the pool of available addresses (10.8.0.2-10.8.0.254)?

Is it something like that the first client gets the .2 address, the next one .3 address? Or is it that addresses are assigned at random? Or is it something else, if it is .5, 9., why is it like that?

For a multiclient OpenVPN configuration, as we can find from the relevant documentation (server.conf comments),

Configure server mode and supply a VPN subnet for OpenVPN to draw client addresses from. The server will take 10.8.0.1 for itself, the rest will be made available to clients. Each client will be able to reach the server on 10.8.0.1.

server 10.8.0.0 255.255.255.0

So, as we understand, we are actually assigning a pool 256 addresses, the first usable address being 10.8.0.1 and the last usable should be 10.8.0.254. Among these, the first of the addresses (10.8.0.1) will be assigned to the server, as already made explicit in the above text.

Also, in the client configuration file, we find something like,

The hostname/IP and port of the server. You can have multiple remote entries to load balance between the servers.

remote my-server-1 1194

Where, the last line, as I deduce, should be written as,

remote 10.8.0.1 1194

in order to match with the server address.

(This statement is not correct, see this answer.)

Now, my question is, which algorithm does the sever follow in order to assign addresses to the client from the pool of available addresses (10.8.0.2-10.8.0.254)?

Is it something like that the first client gets the .2 address, the next one .3 address? Or is it that addresses are assigned at random? Or is it something else, if it is .5, 9., why is it like that?

edited title
Link
Masroor
  • 305
  • 2
  • 3
  • 12

How does OpenVPN server assignsassign client IP addresses in case of multiclient configuration?

added 38 characters in body
Source Link
Masroor
  • 305
  • 2
  • 3
  • 12
Loading
edited title
Link
Masroor
  • 305
  • 2
  • 3
  • 12
Loading
Source Link
Masroor
  • 305
  • 2
  • 3
  • 12
Loading