Community discussions

MikroTik App
 
roadracer96
Forum Veteran
Forum Veteran
Topic Author
Posts: 733
Joined: Tue Aug 25, 2009 12:01 am

FreeRADIUS Simultaneous-Use and Disconnect ?

Thu Jul 08, 2010 9:21 am

I have simultaneous-use working w/ checkrad and snmp. Works great there. Is there any way to make FreeRADIUS disconnect the existing session when checkrad runs instead of just denying the new connection?

EDIT: Maybe modifying the checkrad script to just do an SNMP3 write? Can SNMP be used to disconnect a session if the portid is known?
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: FreeRADIUS Simultaneous-Use and Disconnect ?

Fri Jul 09, 2010 3:46 pm

It is not possible to disconnect user with SNMP (any user).
Disconnect messages (PoD) could be used to disconnect the user (ppp).
 
roadracer96
Forum Veteran
Forum Veteran
Topic Author
Posts: 733
Joined: Tue Aug 25, 2009 12:01 am

Re: FreeRADIUS Simultaneous-Use and Disconnect ?

Fri Jul 09, 2010 6:13 pm

Thanks.. Already got it. Modified the checkrad script to send a disconnect-message when a new authentication comes in. Works like a champ!
 
vdeluca
just joined
Posts: 18
Joined: Sat Jun 03, 2006 3:18 am

Re: FreeRADIUS Simultaneous-Use and Disconnect ?

Sun Oct 24, 2010 6:56 am

so share with us !
 
roadracer96
Forum Veteran
Forum Veteran
Topic Author
Posts: 733
Joined: Tue Aug 25, 2009 12:01 am

Re: FreeRADIUS Simultaneous-Use and Disconnect ?

Mon Oct 25, 2010 3:42 am

52,53c52,53
< $debug                = "";
< #$debug               = "$logdir/checkrad.log";
---
> #$debug               = "";
> $debug                = "$logdir/checkrad.log";
158a159,168
> sub mtdisconnect {
>       my ($client) = @_;
>       local $_;
>
>       print LOG " radclient ip.ad.re.ss:3799 disconnect radiussecret
>       $_ = `echo "User-Name := $client" | radclient ip.ad.re.ss:3799 disconnect radiussecret
>
>       return $_;
> }
>
1186,1187c1196,1197
<
<
---
>   @mtdiscon = mtdisconnect($ARGV[3]);
>   foreach $line ( @mtdiscon ){
1196a1207
> }

This is a diff agains a centos 5.5 freeradius default checkrad script. When client tries to reconnect, it will disconnect the existing session, then they client has to reconnect again.

Works for my purposes.

Who is online

Users browsing this forum: Julien, prawira and 89 guests