On Mon, Nov 15, 2004 at 06:56:27PM +0100, Nicolas Baradakis wrote: > Pasi Kärkkäinen wrote: > > > But, I'm using sql-users.. How do you put that kind of entries to > > (my)sql? > > http://www.frontios.com/freeradius.html > http://www.freeradius.org/cgi-bin/cvsweb.cgi/~checkout~/radiusd/doc/rlm_sql?rev=1.4 >
Back to this problem after some time. I have read both of those links.. but still I can't figure out how to do this in sql-users: >You need one module instance of rlm_attr_rewrite for each realm. >In the "users" file you put something like >DEFAULT Realm == "foo.net", Post-Proxy-Type := post.proxy.foo >DEFAULT Realm == "bar.net", Post-Proxy-Type := post.proxy.bar mysql> select * from radreply; +----+------------------+-------------------+----+-------------+ | id | UserName | Attribute | op | Value | +----+------------------+-------------------+----+-------------+ mysql> select * from usergroup; +----+----------------------+-------------+ | id | UserName | GroupName | +----+----------------------+-------------+ mysql> select * from radcheck; +----+----------------------+-----------+----+---------------+ | id | UserName | Attribute | op | Value | +----+----------------------+-----------+----+---------------+ mysql> select * from radgroupcheck; +----+-------------+-----------+----+--------------------+ | id | GroupName | Attribute | op | Value | +----+-------------+-----------+----+--------------------+ mysql> select * from radgroupreply; +----+-----------+-----------------------+----+---------------------+------+ | id | GroupName | Attribute | op | Value | prio | +----+-----------+-----------------------+----+---------------------+------+ In my setup freeradius is acting as proxy server. It receives a request, and based on realm, does the proxying. After the remote radius-server replies, my freeradius should add IP-address from some IP-pool based on Realm of the request. So there is no local userdata in sql. So, to do that, I need to add Post-Proxy-Type based on realm of the proxied request. I can't figure out how to express this with the sql tables: "DEFAULT Realm == "foo.net", Post-Proxy-Type := post.proxy.foo" There's no Realm field in the sql.. Could I use rlm_attr_filter to add Post-Proxy-Type? rlm_attr_filter is processed for the proxy replies and you can match realms there.. so it seems like a right place to do this.. I'll try this and see what happens. Thanks for your help! -- Pasi Kärkkäinen - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html