Hi, I am working with freeradius and mikrotik gateway for a long time, but recently I detect in my PostgreSQL database, in radacct table some inconsistencies. First af all, I say that I have the standard configuration file (postgres.sql) for accounting queries. My problem is sometimes the field acctstoptime is full when the user is connected. I can see the user in my hotspot as alive session. What is my problem? the issue is all interim update queries are rejected because the SQL update query does not find the folloing SQL WHERE: AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND FramedIPAddress= '%{Framed-IP-Address}' AND AcctStopTime IS NULL because AcctStopTime = '<date>' When this field is fill in? Another thing is when the acctsopttime is not null, too the acctterminatecause = '' (it is a blank, instad of a NULL value) . Thanks. _________________________________________________________________ Descarga el nuevo Messenger, más divertido que nunca. http://download.live.com/
Hello, I'm a newbie, with some delphi/pascal programming skills, but no knowledge of C. I've been watching Freeradius developments for the last 4 years, and am very impressed by how much the community has grown and software has developed since then. Henceforth, i am exploring into the possibility of using freeradius for my authentication project. For the last few days, i've been experimenting with the cygwin version of Freeradius (Freeradius.net), and trying to figure out an easy way for me to add custom authentication procedure to Freeradius that works on both Windows/Linux platforms. 3 methods come into mind, rlm_perl, rlm_exec and custom module. Custom module will be the last resort since it requires greater effort, and hence cost. Firstly, I've got file and rlm_mysql working on freeradius.net. Then comes rlm_perl, which was a problem as it wasn't available in the freeradius.net installation (not found inside lib folder), so i can't use it. Next, i tried rlm_exec, and got a no such file error - i tried setting different paths in radiusd.conf, but to no avail. Exec-Program output: Exec-Program: FAILED to execute c:/freeradius.net/bin/test.pl: No such file or directory Exec-Program-Wait: plaintext: Exec-Program: FAILED to execute c:/freeradius.net/ bin/test.pl: No such file or directory Exec-Program: returned: 1 rlm_exec (exec): External script failed For radiusd.conf, i tried "c:/freeradius.net/bin/test.pl", "c:\freeradius.net\bin\test.pl", "test.pl", "/freeradius.net/bin/test.pl", "\freeradius.net\bin/test.pl", and also tried placing test.pl on C drive root. E.g. exec { program = "c:/freeradius.net/bin/test.pl" wait = yes input_pairs = request output_pairs = reply } Some questions which i hope someone here experienced can provide me with some insights. :) 1). Is there a way to get the cygwin version of rlm_perl. 2). Why am i facing the path/file not found problem? Does this mean the cygwin version of rlm_exec doesn't work? 3). Are there any other options for me besides rlm_exec and rlm_perl? 4). If i were to implement a custom module, must it be compiled into radiusd.exe? I will want to avoid messing with the cygwin compiled radiusd.exe. And if that is not the case, can i use a crossplatform programming language like freepascal to implement the module, instead of C? A little info on the custom authentication procedure: 1. I need to provide a double-factor authentication to my users. 2. The first level will be a simple challenge and password (i reckon that this can be done using File or MySQL). 3. Upon successful first authentication, the user is not given access-accept, instead, he needs to enter a second password (this is the OTP). The OTP must be generated by the custom script/module by accessing some external database - this is done immediately after the first authentication has been successfully completed. Thanks in advance. Rgds, Joshua _________________________________________________________________ Easily edit your photos like a pro with Photo Gallery. http://get.live.com/photogallery/overview
Joshua Lim wrote:
1). Is there a way to get the cygwin version of rlm_perl.
Compile it yourself from source.
2). Why am i facing the path/file not found problem? Does this mean the cygwin version of rlm_exec doesn't work?
No idea. It's a cygwin issue.
3). Are there any other options for me besides rlm_exec and rlm_perl?
Creating a native port of FreeRADIUS to Windows, or paying for one.
4). If i were to implement a custom module, must it be compiled into radiusd.exe? I will want to avoid messing with the cygwin compiled radiusd.exe. And if that is not the case, can i use a crossplatform programming language like freepascal to implement the module, instead of C?
The server is written in C, not pascal.
A little info on the custom authentication procedure:
1. I need to provide a doubl! e-factor authentication to my users. 2. The first level will be a simple challenge and password (i reckon that this can be done using File or MySQL).
Maybe.
3. Upon successful first authentication, the user is not given access-accept, instead, he needs to enter a second password (this is the OTP). The OTP must be generated by the custom script/module by accessing some external database - this is done immediately after the first authentication has been successfully completed.
You will need a custom module to do this. Alan DeKok.
Joshua Lim wrote:
A little info on the custom authentication procedure:
1. I need to provide a doubl! e-factor authentication to my users. 2. The first level will be a simple challenge and password (i reckon that this can be done using File or MySQL).
Maybe.
3. Upon successful first authentication, the user is not given access-accept, instead, he needs to enter a second password (this is the OTP). The OTP must be generated by the custom script/module by accessing some external database - this is done immediately after the first authentication has been successfully completed.
You will need a custom module to do this. Alan DeKok.
Thanks. :)
_________________________________________________________________ Manage multiple email accounts with Windows Live Mail effortlessly. http://www.get.live.com/wl/all
One silly question. If i'm using cygwin version of freeradius.net, and i wish to create a custom module, do i need to recompile Radiusd with cygwin (i would like to avoid that as far as possible)? Or can i just simply compile my newly created module with cygwin? I read this but still can't figure out - http://wiki.freeradius.org/Modules Appreciate again. :) From: joshua__lim@hotmail.com To: freeradius-users@lists.freeradius.org Subject: RE: Best way of adding custom authentication procedure to Freeradius that works in Windows/Linux platforms? Date: Fri, 12 Dec 2008 16:10:16 +0000 Joshua Lim wrote:
A little info on the custom authentication procedure:
1. I need to provide a doubl! e-factor authentication to my users. 2. The first level will be a simple challenge and password (i reckon that this can be done using File or MySQL).
Maybe.
3. Upon successful first authentication, the user is not given access-accept, instead, he needs to enter a second password (this is the OTP). The OTP must be generated by the custom script/module by accessing some external database - this is done immediately after the first authentication has been successfully completed.
You will need a custom module to do this. Alan DeKok.
Thanks. :)
Share your beautiful moments with Photo Gallery. Windows Live Photo Gallery _________________________________________________________________ Easily edit your photos like a pro with Photo Gallery. http://get.live.com/photogallery/overview
I am working with freeradius and mikrotik gateway for a long time, but recently I detect in my PostgreSQL database, in radacct table some inconsistencies. First af all, I say that I have the standard configuration file (postgres.sql) for accounting queries. My problem is sometimes the field acctstoptime is full when the user is connected. I can see the user in my hotspot as alive session. What is my problem? the issue is all interim update queries are rejected because the SQL update query does not find the folloing SQL WHERE: AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND FramedIPAddress= '%{Framed-IP-Address}' AND AcctStopTime IS NULL because AcctStopTime = '<date>'
If you are using default configuration you should have detail file logs as well. That log is created for each NAS daily by default (NAS IP/detail-date). Check the detail file to see if accounting Stop packet was received while the session was still alive. Accounting Stop packet should be the only thing that inserts dates there. Ivan Kalik Kalik Informatika ISP
It is what I thought: Accounting Stop packet should be the only thing that inserts dates. Thanks.> To: freeradius-users@lists.freeradius.org> Subject: Re: accounting bug in Mikrotik> Date: Thu, 11 Dec 2008 10:59:26 +0100> From: tnt@kalik.net> > > I am working with freeradius and mikrotik gateway for a long time, but recently I detect in my PostgreSQL database, in radacct table some inconsistencies. First af all, I say that I have the standard configuration file (postgres.sql) for accounting queries.> > My problem is sometimes the field acctstoptime is full when the user is connected. I can see the user in my hotspot as alive session. What is my problem? the issue is all interim update queries are rejected because the SQL update query does not find the folloing SQL WHERE:> > AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND FramedIPAddress= '%{Framed-IP-Address}' AND AcctStopTime IS NULL> >because AcctStopTime = '<date>'> >> > If you are using default configuration you should have detail file logs> as well. That log is created for each NAS daily by default (NAS> IP/detail-date). Check the detail file to see if accounting Stop packet> was received while the session was still alive. Accounting Stop packet> should be the only thing that inserts dates there.> > Ivan Kalik> Kalik Informatika ISP> > -> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html _________________________________________________________________ Descarga el nuevo Messenger, más divertido que nunca. http://download.live.com/
participants (4)
-
Alan DeKok -
Joshua Lim -
Santiago Balaguer García -
tnt@kalik.net