how to refer to default virual server via dynamic clients sql lookup
Alan DeKok
aland at deployingradius.com
Wed Aug 10 14:42:50 CEST 2011
Łukasz Kostka wrote:
> i have 2 virtual servers active:
> default
> dynamic-clients
No, you don't. The debug log clearly shows this.
> i wan to lookup every nas via sql dynamic-clients.
>
> my dynamic-clients configuration file
>
> client dynamic {
> ipaddr = 0.0.0.0
> netmask = 0
> lifetime = 3600
> }
This is wrong. See raddb/sites-available/dynamic-clients.
This is documented. Use the example that ships with the server. It
works.
> doesn't matter if i have NULL or just empty string or default in column
> server in table nas freeradius in -X mode says:
>
> rad_recv: Access-Request packet from host 10.194.3.239 port 35419,
> id=31, length=85
> Service-Type = Login-User
> User-Name = "ukasz"
> User-Password = "dupa"
> Calling-Station-Id = "10.194.3.230"
> NAS-Identifier = "admini-pokoj"
> NAS-IP-Address = 10.194.3.239
> server {
> No such virtual server ""
> } # server
> Using Post-Auth-Type Reject
> No such virtual server ""
>
> if i comment the line with #
> FreeRADIUS-Client-Virtual-Server = "%{sql: SELECT server FROM nas WHERE
> nasname = '%{Packet-Src-IP-Address}'}"
>
> freeradius lookups the default server but it is not whot i want.
What does that mean? If you have a NULL field in the "server" column,
it means "use the default server". But here you say using the default
server isn't what you want.
Which one is true?
> i have found a dirty hack how to solve this problem:
>
> i have basicly created a file default-default file in
> /etc/sites-enabled/ and it countains:
>
> server default-default {
> $INCLUDE ${confdir}/sites-available/default
> }
DON'T DO THAT. It's wrong. It's broken. It's not needed.
> and when i type default-default in sql collumn server, my authentication
> requests goes to default server.
>
> maybe i am doing something worong. i could not find any info how to
> refer to default virtual server in sql.
Yes, you're doing something wrong. This is documented. Lots. The
examples work. Use them.
Even after 10+ years of doing this, I'm still amazed at the amount of
effort people put into breaking the server.
Alan DeKok.
More information about the Freeradius-Users
mailing list