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

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

  • Subject: RE: [Openvpn-users] Static Address assignment for particular users
  • From: "Andrew J. Richardson" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 21 Jan 2005 16:55:16 -0500
  • Importance: Normal

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

It won't, but you can do this: let OpenVPN assign from the bottom of the
subnet up (192.168.x.2, 3, 4, etc.) while assigning your static clients
their addresses from the top of the subnet down (192.168.x.254, 253, etc.)
using client-config-dir and ifconfig-push.  Unless you have a real hoard of
clients connecting, the two should never meet.


Openvpn-users mailing list