strongSwan + FreeRadius DHCP pool
Laurens Vets
laurens at daemon.be
Mon Apr 18 00:10:45 CEST 2016
On 2016-04-15 12:19, Alan DeKok wrote:
> On Apr 15, 2016, at 3:03 PM, Laurens Vets <laurens at daemon.be> wrote:
>> So I've added several ip addresses to the radippool table. For
>> testing purposes, I'm using 2 pools, 1_pool and 2_pool. Can I assign a
>> pool based on clients listed in clients.conf? ("ippool = 1_pool" does
>> not seem to work)
>
> You can't just invent syntax and stick it into the configuration
> files.
>
> The documentation says that you need to set Pool-Name for the pool
> module to allocate an IP. Setting "ippool = 1_pool" in the
> clients.conf file doesn't do that.
>
> You need to write "unlang" statements which set the Pool-Name. See
> the default configuration files for examples of using unlang.
So there's no way to set Pool-Name in the clients.conf file?
From what I can see in the unlang manual, I have to do:
update control {
&Pool-Name := "1_pool"
}
Do I need to do that in mods-enabled/dhcp_sqlippool? If so, will that
mean I will have to write unlang if statements to match a pool to some
other attribute (for instance NAS-Port-Id, Called-Station-Id or
NAS-Identifier)
What I'm thinking is that I have to do the following (in quick
pseudocode) somewhere:
update control {
if(Called-Station-Id eq 1.1.1.1) {
pool-name = "1_pool"
}
elseif(Called-Station-Id eq 2.2.2.2) {
pool-name = "2_pool"
}
}
I'm struggling with the 'somewhere' part :)
More information about the Freeradius-Users
mailing list