Add Pool-Name attribute to request
Leo Eraly
leo at unstable.be
Thu Aug 23 14:43:14 CEST 2007
Hi,
Is it possible with freeradius (1.1.7) to do the following:
Pseudo code:
if NAS-IP-Address == 1.1.1.1
add Pool-Name: foo
if NAS-IP-Address = 2.2.2.2
add Pool-Name: bar
...
And in mysql I have my 2 ip_pools configured (foo and bar) from which
the machines should get an appropriate ip.
So I want to add an extra attribute (which is used for ip pooling)
depending on the NAS from which the request originates.
My config should be something like this:
I assume this searchfor is not valid.
attr_rewrite add_my_pool {
attribute = Pool-Name
searchin = packet
searchfor = "NAS-IP-Address = 1.1.1.1"
replacewith = "test_pool"
new_attribute = yes
max_matches = 1
}
post-auth {
add_my_pool
sqlippool
}
Is this possible?
Kind regards,
Leo
--
Leo Eraly
<leo at unstable dot be>
More information about the Freeradius-Users
mailing list