Re: NAS list with MySQL

2008-09-17 Thread Alan DeKok
fibie roosadhy wrote:
 dear all,
 i use command 'radiusd -X' to debug.i found this :
 rlm_sql (hotspot): - generate_sql_clients
 rlm_sql (hotspot): Query: SELECT * FROM nas_10

  You edited the default queries, and broke the server.

  Don't do that unless you understand the queries, and understand what
they're doing.

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


Re: NAS list with MySQL

2008-09-17 Thread fibie roosadhy
i have solved the problemthis is my sql-hotspot.conf
# Set to 'yes' to read radius clients from the database ('nas' table)
readclients = yes
## Table to keep radius client info
nas_table = nas_10
###
#  NAS Query
###
#  This query retrieves the radius clients
#
#  0. Row ID (currently unused)
#  1. Name (or IP address)
#  2. Shortname
#  3. Type
#  4. Secret
###
nas_query = SELECT id, nasip, shortname, secret FROM ${nas_table}

i just do the stupid trial and erroravrakadavra.
mysql desc nas_10;
+-+--+--+-+---++
| Field   | Type | Null | Key | Default   | Extra  |
+-+--+--+-+---++
| id  | int(10)  | NO   | PRI | NULL  | auto_increment |
| nasip   | varchar(128) | NO   | MUL | NULL  ||
| shortname   | varchar(32)  | YES  | | NULL  ||
| community   | varchar(50)  | YES  | | NULL  ||
| description | varchar(200) | YES  | | RADIUS Client ||
| *secret*  | varchar(60)  | NO   | | secret|
|
| tgl_pasang  | date | NO   | | NULL  ||
+-+--+--+-+---++
7 rows in set (0.00 sec)
i place 'secret' on 6th field. and the query works..
but i still confuse ...WHY ???



2008/9/17 Alan DeKok [EMAIL PROTECTED]

 fibie roosadhy wrote:
  dear all,
  i use command 'radiusd -X' to debug.i found this :
  rlm_sql (hotspot): - generate_sql_clients
  rlm_sql (hotspot): Query: SELECT * FROM nas_10

   You edited the default queries, and broke the server.

  Don't do that unless you understand the queries, and understand what
 they're doing.

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

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

Re: NAS list with MySQL

2008-09-17 Thread fibie roosadhy
i don't know what the effect of this row in rlm_sql.c

DEBUG(rlm_sql (%s): Read entry
nasname=%s,shortname=%s,secret=%s,inst-config-xlat_name,
*row[1],row[2],row[5]*);


2008/9/17 fibie roosadhy [EMAIL PROTECTED]

 i have solved the problemthis is my sql-hotspot.conf
 # Set to 'yes' to read radius clients from the database ('nas' table)
 readclients = yes
 ## Table to keep radius client info
 nas_table = nas_10
 ###
 #  NAS Query
 ###
 #  This query retrieves the radius clients
 #
 #  0. Row ID (currently unused)
 #  1. Name (or IP address)
 #  2. Shortname
 #  3. Type
 #  4. Secret
 ###
 nas_query = SELECT id, nasip, shortname, secret FROM ${nas_table}

 i just do the stupid trial and erroravrakadavra.
 mysql desc nas_10;

 +-+--+--+-+---++
 | Field   | Type | Null | Key | Default   | Extra
 |

 +-+--+--+-+---++
 | id  | int(10)  | NO   | PRI | NULL  | auto_increment
 |
 | nasip   | varchar(128) | NO   | MUL | NULL  |
 |
 | shortname   | varchar(32)  | YES  | | NULL  |
 |
 | community   | varchar(50)  | YES  | | NULL  |
 |
 | description | varchar(200) | YES  | | RADIUS Client |
 |
 | *secret*  | varchar(60)  | NO   | | secret
 ||
 | tgl_pasang  | date | NO   | | NULL  |
 |

 +-+--+--+-+---++
 7 rows in set (0.00 sec)
 i place 'secret' on 6th field. and the query works..
 but i still confuse ...WHY ???



 2008/9/17 Alan DeKok [EMAIL PROTECTED]

 fibie roosadhy wrote:
  dear all,
  i use command 'radiusd -X' to debug.i found this :
  rlm_sql (hotspot): - generate_sql_clients
  rlm_sql (hotspot): Query: SELECT * FROM nas_10

   You edited the default queries, and broke the server.

  Don't do that unless you understand the queries, and understand what
 they're doing.

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



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

Re: NAS list with MySQL

2008-09-17 Thread Alan DeKok
fibie roosadhy wrote:
 i don't know what the effect of this row in rlm_sql.c
 
 DEBUG(rlm_sql (%s): Read entry
 nasname=%s,shortname=%s,secret=%s,inst-config-xlat_name,
 *row[1],row[2],row[5]*);

  That is *not* what's in the current version of the code.

  You're running a version that's over 4 years old.

  Upgrade.

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


NAS list with MySQL

2008-09-16 Thread fibie roosadhy
dear all,
i use command 'radiusd -X' to debug.i found this :
rlm_sql (hotspot): - generate_sql_clients
rlm_sql (hotspot): Query: SELECT * FROM nas_10
rlm_sql (hotspot): Reserving sql socket id: 7
rlm_sql_mysql: query:  SELECT * FROM nas_10
rlm_sql (hotspot): Read entry
nasname=10.11.12.0/24,shortname=gsd-lt7,*secret=gsd** lantai 7*
rlm_sql (hotspot): Adding client 10.11.12.0/24 (gsd-lt7) to clients list
rlm_sql (hotspot): Read entry
nasname=10.11.21.0/24,shortname=gsd-lt14,*secret=**untuk** training*
rlm_sql (hotspot): Adding client 10.11.21.0/24 (gsd-lt14) to clients list
rlm_sql (hotspot): Released sql socket id: 7

fact,in my nas_10 table are :
mysql select * from nas_10 \G;
*** 1. row ***
id: 1
 nasip: 10.11.12.0/24
 shortname: gsd-lt7
secret: telkom
 community: mabes
description: gsd lantai 7
 tgl_pasang: 2008-09-11
*** 2. row ***
id: 2
 nasip: 10.11.21.0/24
 shortname: gsd-lt14
secret: telkom
 community: lt14
description: untuk training
 tgl_pasang: 2008-09-11
2 rows in set (0.00 sec)

can you help me please,
thanks.

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

Re: NAS list with MySQL

2008-01-20 Thread Pawel Cieplinski
[EMAIL PROTECTED] wrote:

Hi


 
 with 1.1.x i believe you still need a single entry in clients.conf
 - a fake entry - eg 127.0.0.2  or it barfs. 2.0.0 doesnt have this
 issue
 
 alan
 -
Thanks i managed to sort that out

Can u tell me about stability in freeradius 2.0.0. I am preparing a project
for servers wchich will have to serve more than few milion entries (users) and
i am concercn using lastests versions

Pawel Cieplinski


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


Re: NAS list with MySQL

2008-01-20 Thread A . L . M . Buxey
Hi,

 Can u tell me about stability in freeradius 2.0.0. I am preparing a project
 for servers wchich will have to serve more than few milion entries (users) and
 i am concercn using lastests versions

personally I would go for 2.0.0 - its been in beta for a long long
time, it handles the packets better, it has far better scalability
and its does have the quirks that live in the 1.1.x branch

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


Re: NAS list with MySQL

2008-01-20 Thread Alan DeKok
Pawel Cieplinski wrote:
 Can u tell me about stability in freeradius 2.0.0. I am preparing a project
 for servers wchich will have to serve more than few milion entries (users) and
 i am concercn using lastests versions

  A number of very large sites have been using pre-releases of 2.0.0 for
a long time.  The final release has been out for almost 2 weeks, and I
haven't heard of a single major problem.  Just a few minor issues.

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


Re: NAS list with MySQL

2008-01-19 Thread orion
the script nas.sql has the mysql table schema.
the file sql.conf at the end you can see :


# Set to 'yes' to read radius clients from the database ('nas' table)
# Clients will ONLY be read on server startup.  For performance
# and security reasons, finding clients via SQL queries CANNOT
# be done live while the server is running.
#
#readclients = yes

# Table to keep radius client info
nas_table = nas

As you can see the default table name is nas ( can you imagine :-) ).
Uncoment
readclients =  yes

Make configuration changes at radiusd.conf and enable sql module.




On 19/01/2008, Pawel Cieplinski [EMAIL PROTECTED] wrote:

  Hi there... i am new to free radius. I already successfully installed
 freeradius 1.1.7 with mysql5.1. The point is NAS's IPs and secrets are
 configured in clients.conf. I cannot find anything how to put those data
 to SQL database. Sql.conf doesn't describe any table or value for clients,
 can anyone give any clue how to store those data in SQL database



 Pawel Cieplinski

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

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

Re: NAS list with MySQL

2008-01-19 Thread A . L . M . Buxey
Hi,

 Hi there... i am new to free radius. I already successfully installed
 freeradius 1.1.7 with mysql5.1. The point is NAS's IPs and secrets are
 configured in clients.conf. I cannot find anything how to put those data to
 SQL database. Sql.conf doesn't describe any table or value for clients, can
 anyone give any clue how to store those data in SQL database

sql.conf has the readclients directive and the sql schema clearly
shows the nas table 

mysqldescribe nas;

simply populate. enable the readclients directive.

with 1.1.x i believe you still need a single entry in clients.conf
- a fake entry - eg 127.0.0.2  or it barfs. 2.0.0 doesnt have this
issue

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