[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Static Address assignment for particular users


  • Subject: Re: [Openvpn-users] Static Address assignment for particular users
  • From: Mathias Sundman <mathias@xxxxxxxxxx>
  • Date: Fri, 21 Jan 2005 20:16:47 +0100 (CET)

On Fri, 21 Jan 2005, Michael Kelly wrote:
I was just wondering, is there a way I can give a particular user a static address outta ip pool range when that particular user connects to the vpn, and obviously at the same time take that range outta the dynamic range when he gets assigned it.


(So for example my server has a /24 ip pool to dynamically allocate to clients, I wanna allocate a single static address outta that range to a particular client, remove it from the range and leave the rest of the range for my other dynamic clients)

You can accomplish this with the --client-config-dir option on the servr side. After the directive put a path and inside of that directory create a file with the same name as the cn name in the certificate. In the file use the --ifconfig-push directive and send the client his IP address.

For your reference this is well documented in the man page.

I'm not sure that will make OpenVPN exclude that IP address from the normal pool though.


If it isn't I think that would be a good enhancement though.

An other option is to use the --ifconfig-pool-persist option and add that client manually to the pool-file. According to the manpage, this can't be trusted but if you set the seconds parameter = 0, I think it should be safe.

--
_____________________________________________________________
Mathias Sundman                  (^)   ASCII Ribbon Campaign
OpenVPN GUI for Windows           X    NO HTML/RTF in e-mail
http://www.nilings.se/openvpn    / \   NO Word docs in e-mail

____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users