Newbie and Sqlippool

Antonio Modesto modesto at isimples.com.br
Wed Feb 1 19:01:02 CET 2012


On Wed, 2012-02-01 at 20:59 +0700, Fajar A. Nugraha wrote:

> 2012/2/1 Antonio Modesto <modesto at isimples.com.br>:
> > But I don't want to use per-user pools, if it is possible,
> > the better solution for me would be setting the pool based on some
> > information of the NAS, because my routing topology doesn't permit a single
> > pool for all cities that we attend.
> 
> It depends.
> 
> If your NAS sends some attribute that you can use (e.g
> NAS-IP-Address), AND the number of possible values for that attribute
> is small, AND you use FR2, you can just use unlang in authorize or
> post-auth section to set pool-name. Manpage of unlang:
> http://freeradius.org/radiusd/man/unlang.html
> Look at "if" and "update" keyword. Alan already wrote the "update" example.
> 
> Another possibility is to store the NAS-IP-Address (or whatever
> attribute you use) <-> Pool-Name mapping in your own sql table, and
> using unlang you can do something like
> 
> update control {
>    Pool-Name := "%{sql: SELECT pool_name FROM nas_pool_name WHERE
> nas_ip_address='%{NAS-IP-Address}'"


Yes, good idea, I can create a custom table for that. I just need to
understand how this stuff (authorize, post-auth) works, I'm a little
lost with these things. So far I didn't get setting the pool_name to a
custom name, I am testing with the default "sqlippool".

My production radius server is running freeradius 1.1.8, I installed
freeradius 2 in another server with another SQL database and copied the
configuration files from the production server to the test server and
changed some stuff to get it running, then I am doing these tests in
this server. I don't know if Freeradius 2.x are compatible with
freeradius 1.1.8 configuration files.


Thanks and sorry for the amount of questions.

Regards.


> }
> 
> ... where nas_pool_name is your own custom table.
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120201/56f706c2/attachment.html>


More information about the Freeradius-Users mailing list