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
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