SQL NAS table

Alex M alexm at lrcommunications.net
Wed Oct 26 00:03:56 CEST 2005


I have set the NAS table to to have values:
Nasname: <my ip addres>
Secret: testing123

When im trying to test the connection, on the server im getting unknown
client... Why?






-----Original Message-----
From: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] On Behalf Of Guy
Fraser
Sent: Tuesday, October 25, 2005 1:06 PM
To: freeradius-users at lists.freeradius.org
Subject: Re: SQL NAS table

On Tue, 2005-25-10 at 12:52 -0400, Alex M wrote:
> Can some one point me to the documentation on use of SQL NAS table?
> 
> So that I can add nas devices to the DB and not a text file?
> 
...snip...

There has been discussion on this in the past, here is a 
message I sent as a response to this list, that might point 
you in the right direction.


---Copied message from archive---
On Thu, 2005-15-09 at 15:08 -0400, Alan DeKok wrote:
> > Am I to take it that it is not possible to use SQL for the
clients.conf
> > file? And if that it the case could someone please explain what the
nas
> > table is for in the database schema?
> 
>   It's possible.  You do need at least one entry in "clients.conf",
> though.  I suggest "127.0.0.1"
> 
>   Then, read "sql.conf", and set "readclients=yes"
> 
>   Alan DeKok.

Cool.

I am working with FreeBSD and the updates for 1.0.5 are not 
in the cvsup repository yet, so my comment is in regards to 
1.0.4, but may apply to 1.0.5.

I to a look at the postgresql stuff and it appears as though 
the schema will need a little tweak in order to be compitible 
with "rlm_sql.c"'s requirements.

A "SERIAL" column named Id will need to be added.

This will make it compatible :

-- SQL clients table
CREATE TABLE nas (
        id              SERIAL PRIMARY KEY,
        nasname         VARCHAR(128),
        shortname       VARCHAR(32) NOT NULL,
        type            VARCHAR(30),
        ports           int4,
        secret          VARCHAR(60) NOT NULL,
        community       VARCHAR(50),
        description     TEXT
);

This is not required, but this info used to be in the nas
table in the postgresql schema.

-- additional nas info table included in previous nas table
CREATE TABLE nas (
        id              int4 NOT NULL,
        ipaddr          INET PRIMARY KEY,
        snmp            VARCHAR(10),
        naslocation     VARCHAR(32)
);

---End of message---


- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list