Page 1 of 1

OPENVPN ip is increased by 4

Posted: Tue Mar 19, 2013 12:36 pm
by giannos
Hello,
I am trying to configure my ip-pool so as client will get a sequential ip address. For example, if the server has 10.0.0.1 as ip address, I want clients to get 10.0.0.2, 10.0.0.3 and so on. I tried to find a solution but couldn't find one. Currently clients get 10.0.0.6, 10.0.0.10, 10.0.0.14... Please note that I want these ip addresses to be assigned dynamically and not pre-assigned them into the ipp.txt

Thanks in advance

Re: OPENVPN ip is increased by 4

Posted: Tue Mar 19, 2013 1:12 pm
by maikcat
hi there,
--topology mode
Configure virtual addressing topology when running in --dev tun mode. This direc‐
tive has no meaning in --dev tap mode, which always uses a subnet topology.

If you set this directive on the server, the --server and --server-bridge direc‐
tives will automatically push your chosen topology setting to clients as well.
This directive can also be manually pushed to clients. Like the --dev directive,
this directive must always be compatible between client and server.

mode can be one of:

net30 -- Use a point-to-point topology, by allocating one /30 subnet per client.
This is designed to allow point-to-point semantics when some or all of the con‐
necting clients might be Windows systems. This is the default on OpenVPN 2.0.

p2p -- Use a point-to-point topology where the remote endpoint of the client's tun
interface always points to the local endpoint of the server's tun interface. This
mode allocates a single IP address per connecting client. Only use when none of
the connecting clients are Windows systems. This mode is functionally equivalent
to the --ifconfig-pool-linear directive which is available in OpenVPN 2.0 and is
now deprecated.

subnet -- Use a subnet rather than a point-to-point topology by configuring the
tun interface with a local IP address and subnet mask, similar to the topology
used in --dev tap and ethernet bridging mode. This mode allocates a single IP
address per connecting client and works on Windows as well. Only available when
server and clients are OpenVPN 2.1 or higher, or OpenVPN 2.0.x which has been man‐
ually patched with the --topology directive code. When used on Windows, requires
version 8.2 or higher of the TAP-Win32 driver. When used on *nix, requires that
the tun driver supports an ifconfig(8) command which sets a subnet instead of a
remote endpoint IP address.

This option exists in OpenVPN 2.1 or higher.
Each pair of ifconfig-push addresses represent the virtual client and server IP endpoints. They must be taken from successive /30 subnets in order to be compatible with Windows clients and the TAP-Win32 driver. Specifically, the last octet in the IP address of each endpoint pair must be taken from this set:

[ 1, 2] [ 5, 6] [ 9, 10] [ 13, 14] [ 17, 18]
[ 21, 22] [ 25, 26] [ 29, 30] [ 33, 34] [ 37, 38]
[ 41, 42] [ 45, 46] [ 49, 50] [ 53, 54] [ 57, 58]
[ 61, 62] [ 65, 66] [ 69, 70] [ 73, 74] [ 77, 78]
[ 81, 82] [ 85, 86] [ 89, 90] [ 93, 94] [ 97, 98]
[101,102] [105,106] [109,110] [113,114] [117,118]
[121,122] [125,126] [129,130] [133,134] [137,138]
[141,142] [145,146] [149,150] [153,154] [157,158]
[161,162] [165,166] [169,170] [173,174] [177,178]
[181,182] [185,186] [189,190] [193,194] [197,198]
[201,202] [205,206] [209,210] [213,214] [217,218]
[221,222] [225,226] [229,230] [233,234] [237,238]
[241,242] [245,246] [249,250] [253,254]
Michael.

Re: OPENVPN ip is increased by 4

Posted: Sun Mar 24, 2013 9:19 am
by giannos
Thanks for the reply,
however I cannot find a way to implement it. Could you help me a little bit by giving me an example of what parameter I shall use in server.conf?
Thank you

Re: OPENVPN ip is increased by 4

Posted: Sun Mar 24, 2013 1:47 pm
by maikcat
just add to your config:

Code: Select all

topology subnet
if you use ccd files to assign static ips use:

Code: Select all

ifconfig-push 10.8.0.2 255.255.255.0
Michael.