Hi,

On Sun, Mar 6, 2016 at 9:15 AM, Zoltán Szabó <zo...@zoell.us> wrote:

> I would like to have dynamic IPs assigned from this range:
> 10.8.1.0 - 10.8.1.254
>
> For this, I would like to use a /23, so 255.255.254.0
>
Exclude the last address 10.8.1.254 from the range as that will clash with
the internal dhcp server address on windows -- it could be assigned to all
non-windows clients, but easier just to exclude it.


> And I will assign static IPs from this range:
> 10.8.0.3 - 10.8.1.255 as 0.1 and 0.2 might be assigned to the server.
>
You mean  10.8.0.3 to 10.8.0.255 ?


> I will use this to push to client for static ip:
>
> ifconfig-push 10.8.0.5 255.255.254.0
>
> Could you please help me to modify my config to achieve this?
>

I think replacing "server 10.8.0.0 255.255.255.0" in the server config by
the following lines should do it:

mode server
tls-server
push "topology subnet"
ifconfig 10.8.0.1 255.255.254.0
ifconfig-pool 10.8.1.0 10.8.1.253
route-gateway 10.8.0.1
push "route-gateway 10.8.0.1"

Then push the static ip's in the range 10.8.0.3 to 10.8.0.255  with
ifconfig-push in ccd files.

Though this should work, I've seen things like routing to networks behind a
client  not work as expected with static ip's outside the pool, though
within the subnet (writing from memory). Alternatively, one could keep the
dynamic pool and static pool in separate subnets: i.e., keep the server
directive as is, and assign static ips from outside that /24. Then you'll
need some extra route directives to reach those clients.

Selva
------------------------------------------------------------------------------
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to