Transfer Limit

2012-11-30 Thread Alexandre J. Correa - Onda Internet

Hello !!

How i can measure bandwidth quota monthly, when it exceeds, execute a 
program.. only for active users (online).


My NASes doesn´t accept CoA packets (only PoD).. i will need to run 
external program to 'change' session info..


Regards,

--
Sds.

Alexandre Jeronimo Correa
Socio-Administrador

Onda Internet
www.onda.net.br

IPV6 Ready !

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


Packet Type in modules

2012-11-29 Thread Alexandre J. Correa - Onda Internet

Hello,

I have some scripts that do some sync tasks when freeradius start accouting:

Like this:

created module, named 'sysnotify' with this:

exec sysnotify {
   wait = no
   program = /ondasys/system/sysnotify %{User-Name:-Nenhum} 
%{Framed-IP-Address:-Nenhum} %{Acct-Status-Type:-ERR} 
%{Acct-Session-Id:-ERR} %{NAS-IP-Address}

   packet_type = Accounting-Request
}


and, instanciated at preacct block:

preacct {
  acct_unique
  sysnotify
}

it´s working fine, but i need to optimize this, because this scripts are 
running in Accouting-Start, Accouting-Stop and Interim-Update ..


How i can catch ONLY Start and Stop events ?

Regards !

--
Sds.

Alexandre Jeronimo Correa
Sócio-Administrador

Onda Internet
www.onda.net.br

IPV6 Ready !

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


stop old open session and star new..

2009-03-06 Thread Alexandre J. Correa - Onda Internet

Hello,

How i can solve this problem:

sometimes, some users connections stay locked on radius.. and with, 
Simutaneous-Use resulting = 1 ...


Fri Mar  6 20:29:11 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[alines] (from client Orbit port 256018 cli xxx)
Fri Mar  6 20:29:11 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[alines] (from client Orbit port 256018 cli xxx)
Fri Mar  6 20:29:12 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[cacildof] (from client Orbit port 256019 cli )
Fri Mar  6 20:29:12 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[cacildof] (from client Orbit port 256019 cli )
Fri Mar  6 20:29:17 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[arnaldo] (from client Orbit port 256021 cli xxx)
Fri Mar  6 20:29:17 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[arnaldo] (from client Orbit port 256021 cli )
Fri Mar  6 20:29:17 2009 : Auth: Multiple logins (max 1) [MPP attempt]: 
[vanessam] (from client Orbit port 256020 cli xxx)



how to disconnect previous session and create a new ? 


--
Sds.

Alexandre Jeronimo Correa

Onda Internet
www.onda.net.br

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


Re: RES: exec program, but post-auth

2008-11-04 Thread Alexandre J. Correa - Onda Internet

Thanks for answers,

i obtained ip, acctound-id, etc etc from preacct section, adding exec to 
section !! script filter with Acct-Status-Type = Start working fine now !!


Ivan, in it´s first message i didn´t read to try with accouting packets !!

thanks again !!

Regards..

[EMAIL PROTECTED] wrote:
Here i use Exec-Program-Wait to validade data AFTER auth OK, i need to 
execute other script AFTER auth OK to get IP address assigned to user.


i´m trying to pass %f to my script but return ?.?.?.? because at this 
moment, radius not assigned  ip for user...


how i can do this ?




Where is here? In what section are you trying to run the script?

Ivan Kalik
Kalik Informatika ISP

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

  



--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


exec program, but post-auth

2008-11-03 Thread Alexandre J. Correa - Onda Internet

Hello !!

Here i use Exec-Program-Wait to validade data AFTER auth OK, i need to 
execute other script AFTER auth OK to get IP address assigned to user.


i´m trying to pass %f to my script but return ?.?.?.? because at this 
moment, radius not assigned  ip for user...


how i can do this ?

thanks !!

--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


Re: exec program, but post-auth

2008-11-03 Thread Alexandre J. Correa - Onda Internet
auth are working fine... but i need execute one script after auth OK to 
get the IP that radius assigned to user, have any idea how i can do this ?!


thanks !!!


[EMAIL PROTECTED] wrote:
Here i use Exec-Program-Wait to validade data AFTER auth OK, i need to 
execute other script AFTER auth OK to get IP address assigned to user.


i´m trying to pass %f to my script but return ?.?.?.? because at this 
moment, radius not assigned  ip for user...


how i can do this ?




If radius is not assigning IP's NAS will send them in accounting packets.

Ivan Kalik
Kalik Informatika ISP

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

  



--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


mysql erros

2008-10-21 Thread Alexandre J. Correa - Onda Internet

Hello,
what these erros means ?


Tue Oct 21 23:45:56 2008 : Info: rlm_sql_mysql: Starting connect to 
MySQL server for #21
Tue Oct 21 23:45:58 2008 : Error: WARNING: Unresponsive child (id 
2945448848) for request 27153
Tue Oct 21 23:45:58 2008 : Error: WARNING: Unresponsive child (id 
2937060240) for request 27154
Tue Oct 21 23:45:58 2008 : Error: WARNING: Unresponsive child (id 
2928671632) for request 27155
Tue Oct 21 23:45:58 2008 : Error: WARNING: Unresponsive child (id 
3030645648) for request 27156
Tue Oct 21 23:46:00 2008 : Error: WARNING: Unresponsive child (id 
2970614672) for request 27157
Tue Oct 21 23:46:01 2008 : Info: rlm_sql_mysql: Starting connect to 
MySQL server for #20
Tue Oct 21 23:46:11 2008 : Info: rlm_sql_mysql: Starting connect to 
MySQL server for #26
Tue Oct 21 23:46:15 2008 : Info: rlm_sql_mysql: Starting connect to 
MySQL server for #25
Tue Oct 21 23:46:16 2008 : Info: rlm_sql_mysql: Starting connect to 
MySQL server for #23
Tue Oct 21 23:46:20 2008 : Info: rlm_sql_mysql: Starting connect to 
MySQL server for #24


thanks !

--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


Simultaneous-Use ..

2008-08-29 Thread Alexandre J. Correa - Onda Internet

Hello,

how i can setup freeradius to disconnect previous session of user that 
has Simultaneous-Use = 1 ?!


thanks

--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


md5 passwords

2008-08-27 Thread Alexandre J. Correa - Onda Internet

Hello,

How i can auth users via radius.. using passwords crypt with md5 stored 
on db ?


thanks ?

--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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


php radius client (mount packet data)

2008-08-08 Thread Alexandre J. Correa - Onda Internet

Hello !!

Based on 'Pure PHP radius class' (http://developer.sysco.ch/php/) i´m 
trying to implement disconnect-packet like this command:


echo User-Name := xx | radclient -x 111.222.333.444 disconnect 
secret


freeradius recognizes that packet are disconnect-request but i think 
checksum of packet are incorrect, can someone look and try to discover 
the error ?!


attached class, my changes are commented with //AlexandrE

thanks !!!

--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

.
 *
 *
 * @author: SysCo/al
 * @since CreationDate: 2008-01-04
 * @copyright (c) 2008 by SysCo systemes de communication sa
 * @version $LastChangedRevision: 1.1 $
 * @version $LastChangedDate: 2008-02-04 $
 * @version $LastChangedBy: SysCo/al $
 * @link $HeadURL: radius.class.php $
 * @link http://developer.sysco.ch/php/
 * @link [EMAIL PROTECTED]
 * Language: PHP 4.0.7 or higher
 *
 *
 * Usage
 *
 *   require_once('radius.class.php');
 *   $radius = new Radius($ip_radius_server = 'radius_server_ip_address', $shared_secret = 'radius_shared_secret'[, $radius_suffix = 'optional_radius_suffix'[, $udp_timeout = udp_timeout_in_seconds[, $authentication_port = 1812]]]);
 *   $result = $radius->Access_Request($username = 'username', $password = 'password'[, $udp_timeout = udp_timeout_in_seconds]);
 *
 *
 * Examples
 *
 *   Example 1
 * AccessRequest('user', 'pass'))
 * {
 * echo "Authentication accepted.";
 * }
 * else
 * {
 * echo "Authentication rejected.";
 * }
 * ?>
 *
 *   Example 2
 * SetNasPort(0);
 * if ($radius->AccessRequest('user', 'pass'))
 * {
 * echo "Authentication accepted.";
 * echo "";
 * }
 * else
 * {
 * echo "Authentication rejected.";
 * echo "";
 * }
 * echo $radius->GetReadableReceivedAttributes();
 * ?>
 *
 *
 * External file needed
 *
 *   none.
 *
 *
 * External file created
 *
 *   none.
 *
 *
 * Special issues
 *
 *   - Sockets support must be enabled.
 * * In Linux and *nix environments, the extension is enabled at
 *   compile time using the --enable-sockets configure option
 * * In Windows, PHP Sockets can be activated by un-commenting
 *   extension=php_sockets.dll in php.ini
 *
 *
 * Other related ressources
 *
 *   FreeRADIUS, a free Radius server implementation for Linux and *nix environments: http://www.freeradius.org/
 *   WinRadius, Windows Radius server (free for 5 users): http://www.itconsult2000.com/en/product/WinRadius.zip
 *   Radl, a free Radius server for Windows: http://www.loriotpro.com/Products/RadiusServer/FreeRadiusServer_EN.php
 *   DOS command line Radius client: http://www.itconsult2000.com/en/product/WinRadiusClient.zip
 *
 *
 * Change Log
 *
 *   2008-02-04 1.1   SysCo/al Typo error for the udp_timeout parameter (line 256 in the version 1.0)
 *   2008-01-07 1.0   SysCo/al Initial release
 *
 */


/*
 *
 * Radius
 * Pure PHP radius class
 *
 * Creation 2008-01-04
 * @package radius
 * @version v.1.0
 * @author SysCo/al
 *
 */
class Radius
{
var $_ip_radius_server;   // Radius server IP address
var $_shared_secret;  // Shared secret with the radius server
var $_radius_suffix;  // Radius suffix (default is '');
var $_udp_timeout;// Timeout of the UDP connection in seconds (default value is 5)
var $_authentication_port;// Authentication port (default value is 1812)
var $_accounting_port;// Accouting port (default value is 1813)
var $_nas_ip_address; // NAS IP address
var $_nas_port;   // NAS port
var $_encrypted_password; // Encrypted password, as described in the RFC 2865
var $_user_ip_address;// Remote IP address of the user
var $_request_authenticator;  // Request-Authenticator, 16 octets random number
var $_response_authenticator; // Request-Authenticator, 16 octets random number
var $_username;   // Username to sent to the Radius server
var $_password;   // Password to sent to the Radius server (clear password, must be encrypted)
var $_identifier_to_send; // Identifier field for the packet to be sent
var $_identifier_received;// Identifier field for the received packet
var $_radius_packet_to_send;  // Radius packet code (1=Access-Request, 2=Access-Accept, 3=Access-Reject, 4=Accounting-Request, 5=Accounting-Response, 11=Access-Challenge, 12=Status-Server (experimental), 13=Status-Client (experimental), 255=Reserved
var $_radius_packet_received; // Radius 

two types of auth on same freeradius

2008-08-08 Thread Alexandre J. Correa - Onda Internet

Hello again :P

how i can configure radius to auth users from my pppoe concentrators but 
auth MAC from my access-point too ... (for each type, i need change sql 
queries) !? or i need to run other copy of freeradius (different port 
and config) ?!



thanks !!!

regards,

--
Sds.

Alexandre Jeronimo Correa

Onda Internet - http://www.ondainternet.com.br
OPinguim Hosting - http://www.opinguim.net

Linux User ID #142329

UNOTEL S/A - http://www.unotel.com.br

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