Re: freeradius-1.0.5 compilation error (library -lz not found)

2006-01-02 Thread TK Lew
hi ::

U need the zlib development package installed.

On 1/2/06, K Pang <[EMAIL PROTECTED]> wrote:
> Hi All,
> Happy New Year to all of you!
> i encounterd some compilation errors when compiling freeradius-1.0.5 on
> solaris 8. below is the errors.
>
> /usr/local/src/freeradius-1.0.5-pi/libtool --mode=link gcc -release 1.0.5 \
> -module -export-dynamic  -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
> -DOPENSSL_NO_KRB5 -I/usr/local/ssl/include -Wall -D_GNU_SOURCE -g -Wshadow
> -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W
> -Wredundant-decls -Wundef  -I../.. -I../../../../include \
> -I/usr/local/mysql/include -I/usr/local/src/freeradius-1.0.5-pi/libltdl -o
> rlm_sql_mysql.la -rpath /usr/local/radius5/lib sql_mysql.lo
> -L/usr/local/mysql/lib/mysql -lmysqlclient -lnsl -lresolv -lsocket -lposix4
> -lpthread -lz -lnsl -lresolv -lsocket -lposix4  -lpthread -lz
> rm -fr .libs/rlm_sql_mysql.la .libs/rlm_sql_mysql.*
> .libs/rlm_sql_mysql-1.0.5.*
> /usr/ccs/bin/ld -G -h rlm_sql_mysql-1.0.5.so -o .libs/rlm_sql_mysql-1.0.5.so
>   sql_mysql.lo  -R/usr/local/mysql/lib/mysql -R/usr/local/mysql/lib/mysql
> -L/usr/local/BerkeleyDB.4.2 -L/usr/local/mysql/lib/mysql
> /usr/local/mysql/lib/mysql/libmysqlclient.so -lnsl -lresolv -lsocket
> -lposix4 -lpthread -lz -lnsl -lresolv -lsocket -lposix4 -lpthread -lz -lc
> ld: fatal: library -lz: not found
> ld: fatal: library -lz: not found
> ld: fatal: File processing errors. No output written to
> .libs/rlm_sql_mysql-1.0.5.so
> make[10]: *** [rlm_sql_mysql.la] Error 1
> make[10]: Leaving directory
> `/usr/local/src/freeradius-1.0.5-pi/src/modules/rlm_sql/drivers/rlm_sql_mysql'
>
> what's 'library -lz not found'? i've no idea what's this library.
> is it caused by missing of certain packages? if so, which package should i
> install? pls advise.
> thanks in advance!
>
>
> Rgds,
> Pang
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>

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


Weird Insert sql statement in sqltrace.sql

2005-12-24 Thread TK Lew
hi all ::

I have a Freeradius with Oracle 10.0 running but something weird
appeared in the sqltrace.sql.

Sample weirdness record ::

INSERT into radacct (RadAcctId, AcctSessionId, AcctUniqueId, UserName,
Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime,
AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId,
CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol,
FramedIPAddress, AcctStartDelay, AcctStopDelay) values('',
'cb5241850008c698', '200a59703fc69d6d', '60131234567', '',
'203.82.65.xxx', '', 'Virtual', NULL, TO_DATE('2005-12-23
19:24:35','-mm-dd hh24:mi:ss'), '194', '', '', '', '35440',
'80779', 'streaming.com', '60131234567', '', '', '', '10.161.211.xxx',
'0', '');

By right when accouting start packet come in and the accounting start
time should be recorded and accounting stop time should be NULL. But
in my case as shown above the accounting start time is NULL and
accounting stop time is recorded.

Anybody have encountered this kind of weirdness before ?

Thanks !

Meery Christmas and Happy New Year.

regards

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


sqltrace.log

2005-12-05 Thread TK Lew
hi all ::

Is it adviseable to turn on the sqltrace.log file under production environment ?

Thanks !

BR

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


Re: Query local active session database (radutmp)

2005-11-17 Thread TK Lew
hi Chris ::

Thanks for the reply. Yes indeed my situation is a bit dodgy.

I will explore the SQL option as session database.

Thanks again.

BR

On 11/18/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Quoting TK Lew <[EMAIL PROTECTED]>:
>
> > hi ::
> >
> > My situation is complicated. I have freeradius running which accept
> > accounting start and accounting stop forwarded from customer main
> > radius (SB).
> >
> > Problem is I cannot query the NAS for simultaneous use and the NAS is
> > using the same NAS Port for each accounting start packet. Since I am
> > using radutmp for session database , the accounting start and
> > accounting stop will update the session database.
> >
> > But due to some unexplained situation , no accounting stop packet was
> > received (lost packet or whatever ?) and another accouting start
> > arrived with the same MSISDN number ( username). In the end I have
> > duplicate username in the session database.
> >
> > So i was thinking of before writing the accounting start packet to the
> > session database , perhap it is possible to peform a pre-check on the
> > sesssion database or some preprocess or preacct ?
> >
> > Thanks.
> >
> > BR
> >
> > On 11/17/05, Chris Carver <[EMAIL PROTECTED]> wrote:
> > > On Thu, 2005-11-17 at 23:03 +0800, TK Lew wrote:
> > > > hi ::
> > > >
> > > > Is it possible to query freeradius local session database (radutmp) to
> > > > check for simultaneous use.?
> > > > If exists delete it using radzap command and then only accept the
> > > > Accouting Start packet which then eventually written to radutmp.
> > > >
> > > > I can write the script to delete but I have not ideas how to configure
> > > > the radiusd.conf for my environment ( if it is can be done ). /
> > > >
> > > > Thanks
> > > >
> > > > BR
> > > >
> > > > -
> > > > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> > >
> > > What are you trying to do?  radwho does the query against radutmp that
> > > you're referring to.  The -r flag provides all the information radzap
> > > would need.  I'm not sure what you're trying to do though.  Please me
> > > more specific about what you're trying to achieve.
> > >
> > > -
> > > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> > >
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> >
>
> If you have no way to query the NAS for simultaneous use, this puts you in a
> particular situation regardless of what you do with radutmp.  You can:
>
> A.  Turn off simultaneous use checking and allow users to connect multiple
> times.
>
> B.  Rely entirely upon the radutmp db to determine if a customer is already
> connected and accept the fact that due to UDP you will have some stale
> sessions.  You will need to radzap these as your users file legitimate
> complaints about not being able to connect.  This is a configuration option in
> the radutmp database.
>
> I am still a bit confused about your email and objective.  Keep in mind radius
> accounting happens over udp and you WILL have some lost start/stop packets.
> This will cause radutmp to be incorrect.  The function of checkrad is to query
> the NAS to find out if radutmp is correct or not.  If you cannot query the NAS
> with checkrad, you have to settle for option A or B listed above.
>
> Chris
> -
> 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: Query local active session database (radutmp)

2005-11-17 Thread TK Lew
hi ::

My situation is complicated. I have freeradius running which accept
accounting start and accounting stop forwarded from customer main
radius (SB).

Problem is I cannot query the NAS for simultaneous use and the NAS is
using the same NAS Port for each accounting start packet. Since I am
using radutmp for session database , the accounting start and
accounting stop will update the session database.

But due to some unexplained situation , no accounting stop packet was
received (lost packet or whatever ?) and another accouting start
arrived with the same MSISDN number ( username). In the end I have
duplicate username in the session database.

So i was thinking of before writing the accounting start packet to the
session database , perhap it is possible to peform a pre-check on the
sesssion database or some preprocess or preacct ?

Thanks.

BR

On 11/17/05, Chris Carver <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-11-17 at 23:03 +0800, TK Lew wrote:
> > hi ::
> >
> > Is it possible to query freeradius local session database (radutmp) to
> > check for simultaneous use.?
> > If exists delete it using radzap command and then only accept the
> > Accouting Start packet which then eventually written to radutmp.
> >
> > I can write the script to delete but I have not ideas how to configure
> > the radiusd.conf for my environment ( if it is can be done ). /
> >
> > Thanks
> >
> > BR
> >
> > -
> > List info/subscribe/unsubscribe? See 
> > http://www.freeradius.org/list/users.html
>
> What are you trying to do?  radwho does the query against radutmp that
> you're referring to.  The -r flag provides all the information radzap
> would need.  I'm not sure what you're trying to do though.  Please me
> more specific about what you're trying to achieve.
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>

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


Query local active session database (radutmp)

2005-11-17 Thread TK Lew
hi ::

Is it possible to query freeradius local session database (radutmp) to
check for simultaneous use.?
If exists delete it using radzap command and then only accept the
Accouting Start packet which then eventually written to radutmp.

I can write the script to delete but I have not ideas how to configure
the radiusd.conf for my environment ( if it is can be done ). /

Thanks

BR

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


Re: Interaction between accounting data and radutmp

2005-11-15 Thread TK Lew
hi alan ::

Thanks but changing the NAS port is not an options for me :( since i
am actually using Freeradius for a streaming projects where there are
so many NAS's around.

Based on the Freeradius mailing list , I think i came across a similar
posting (i think your reply is there too).

http://lists.freeradius.org/mailman/htdig/freeradius-users/2002-January/004570.html

This guys basically hacks the rlm_radutmp to use session id.

a. Is possible to use the hacks for session id if NAS port is not an option ?
b. For high performance site , is radumtp perform well ?
c. Or the last option is to use SQL based session database

Thanks again !

Regards

On 11/15/05, Alan DeKok <[EMAIL PROTECTED]> wrote:
> TK Lew <[EMAIL PROTECTED]> wrote:
> > Ahthat why but all the NAS are using the same port !
>
>   Ask your NAS vendor.
>
> > I understand that session index is based on NAS port . Any chance
> > for it to be based on session id ? Is there a patch for it ??
>
>   No.  That simply won't work.
>
>   If you're doing session tracking, the server needs port information.
>
>   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: Interaction between accounting data and radutmp

2005-11-14 Thread TK Lew
hi ::

Ahthat why but all the NAS are using the same port ! I understand
that session index is based on NAS port . Any chance for it to be
based on session id ? Is there a patch for it ??

Thanks again !

On 11/15/05, Alan DeKok <[EMAIL PROTECTED]> wrote:
> TK Lew <[EMAIL PROTECTED]> wrote:
> > I have a weird problem. If I am not mistaken sessions are logged and
> > remove on accouting-start and accouting-stop but I have encountered
> > where an active session for a particular users have been deleted from
> > the session database without the corresponding accounting stop packet.
>
>   Most likely because someone else logged in on the same port.
>
>   Two people can't use the same port at the same time.
>
>   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


Interaction between accounting data and radutmp

2005-11-14 Thread TK Lew
hi all ::

I have a weird problem. If I am not mistaken sessions are logged and
remove on accouting-start and accouting-stop but I have encountered
where an active session for a particular users have been deleted from
the session database without the corresponding accounting stop packet.
I am running Freeradius 1.0.4 on Solaris 9.

Is there a problem with radutmp ??

My config file for radutmp under radiusd.conf ::
===
radutmp {
#  Where the file is stored.  It's not a log file,
#  so it doesn't need rotating.
#
filename = ${logdir}/radutmp

#  The field in the packet to key on for the
#  'user' name,  If you have other fields which you want
#  to use to key on to control Simultaneous-Use,
#  then you can use them here.
#
#  Note, however, that the size of the field in the
#  'utmp' data structure is small, around 32
#  characters, so that will limit the possible choices
#  of keys.
#
#  You may want instead: %{Stripped-User-Name:-%{User-Name}}
username = %{User-Name}


#  Whether or not we want to treat "user" the same
#  as "USER", or "User".  Some systems have problems
#  with case sensitivity, so this should be set to
#  'no' to enable the comparisons of the key attribute
#  to be case insensitive.
#
case_sensitive = yes

#  Accounting information may be lost, so the user MAY
#  have logged off of the NAS, but we haven't noticed.
#  If so, we can verify this information with the NAS,
#
#  If we want to believe the 'utmp' file, then this
#  configuration entry can be set to 'no'.
#
check_with_nas = no

# Set the file permissions, as the contents of this file
# are usually private.
perm = 0600

callerid = "yes"
}


Thanks !

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


radutmp

2005-09-26 Thread TK Lew
hi ::

Is radutmp attributes can added ? What I need to do if I want
"called-station-id" attribute to be display when run "radwho -R" ?

Thank for any reply.

Regards

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


is this possible ?

2005-09-22 Thread TK Lew
hi :

I am not sure that anyone have done this before ::

We have a customer using Steelbelt radius that forward accounting
information to the freeradius server. We can receive the accounting
packet and stored it successfully.
But the problem is we have another application that will do a mapping
from IP address to  MSISDN. In order to do the mapping from IP to
MSISDN , the application need to talk?? to a radius server that have
the information (that means freeradius that receive the accounting
packet). The flow is below ::

handset --> authenticated successfully --> Steelbelt radius forward
accounting packet to Freeradius and the application will the a lookup
for MSISDN that match the IP address before allow the handset to use
the services.

Is this possible ?? The application managed to authenticate itself
successfully with Freeradius but I just cannot send the matching
MSISDN back to the application.

I have tried to use the variable such as %{Calling-Station-Id} in the
access-repky message but no values assign.

Any helps ?

Thanks

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


Users file

2005-09-12 Thread TK Lew
Hello,

I have configured my users file to have the following entries ::
steve  Auth-Type := System
 Calling-Station-ID = calling-station-id

I want freeradius to reply back with Calling-Station-Id whic basically
the MSISDN but instead I got the "calling-station-id"?

What is the correct syntax for calling-station-id ?

Thanks for all !

TK

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