Community discussions

MikroTik App
 
Lupin
Member Candidate
Member Candidate
Topic Author
Posts: 267
Joined: Mon Feb 16, 2009 10:22 pm
Location: Italy

Freeradius: Sending command to Mtk

Wed Mar 04, 2009 10:37 pm

I've a freeradius server running with mysql DB.
I use a Mikrotik HotSpot (2.4Ghz)connected with freeradius server as NAS

What to do for terminate a user session without delete his account on the database from the freeradius server?
And terminate when user is already connected (always from the freeradius server)?

And for limiting internet surfing for 2 hours?

I see that Mikrotik NAS read the "radcheck" table for logging and "radreply" attributes only when client confirm the login page on mikrotik routerBoard and
write "radacct" table when client disconnect from HotSpot.

But when client is running what to do for sending commands from server TO Mirotik ?

Thanks
 
savage
Forum Guru
Forum Guru
Posts: 1264
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: Freeradius: Sending command to Mtk

Wed Mar 04, 2009 11:31 pm

Search the forums please. This has been discussed in detail, many, many time before. AFAIK, I made quite a substantial post about how this works and what is needed...
 
Lupin
Member Candidate
Member Candidate
Topic Author
Posts: 267
Joined: Mon Feb 16, 2009 10:22 pm
Location: Italy

Re: Freeradius: Sending command to Mtk

Wed Mar 11, 2009 8:09 pm

I follow the post on http://forum.mikrotik.com/viewtopic.php ... sh#p143824

But, when i launch the script on freeradius server (without error), in mikrotik log I've the seguent:


01:30:46 radius,debug,packet received Disconnect-Request with id 200 from <MYRADIUSSERVERIP>:57750
01:30:46 radius,debug,packet Signature = 0x1a89e4d0e45b69c7bd87cbd80575dc0b
01:30:46 radius,debug,packet Acct-Session-Id = "8050000f"
01:30:46 radius,debug,packet User-Name = "alessandro"
01:30:46 radius,debug received remote request 36 code=Disconnect-Request from <MYRADIUSSERVERIP>:57750

01:30:46 hotspot,error,info,debug Radius disconnect with no ip provided
01:30:46 radius,debug sending Disconnect-NAK to remote request 36
01:30:46 radius,debug,packet sending Disconnect-NAK with id 200 to <MYRADIUSSERVERIP>:57750
01:30:46 radius,debug,packet Signature = 0xda7dbf1a09a44a3be72d6290ef63a5bf
01:30:46 radius,debug,packet Error-Cause = 406
01:30:46 radius,debug,packet NAS-Identifier = "MikroTik"
01:30:46 radius,debug,packet NAS-IP-Address = <MYMIKROTIKIP>



and the pc-client doesn't disconnect.

---on radius server---
If I execute the command
radwho -r -i -U alessandro
the response is
alessandro,8050000f,shell,S2152726543,Wed 18:52,<MYMIKROTIKIP>,192.168.10.254
If I execute the command
radwho -RU alessandro
the response is
User-Name = "alessandro"
Acct-Session-Id = "8050000f"
NAS-IP-Address = <MYMIKROTIKIP>
NAS-Port = 2152726543
Service-type = Login-User
Framed-IP-Address = 192.168.10.254
Acct-Session-Time = 1036
Calling-Station-Id = "00:18:DE:E0:D5:"
What is the problem?
 
Lupin
Member Candidate
Member Candidate
Topic Author
Posts: 267
Joined: Mon Feb 16, 2009 10:22 pm
Location: Italy

Re: Freeradius: Sending command to Mtk

Thu Mar 12, 2009 7:21 pm

Any news? :(
 
rucevzhuru
newbie
Posts: 43
Joined: Fri May 25, 2007 6:57 pm

Re: Freeradius: Sending command to Mtk

Sat May 16, 2009 1:58 am

How to send disconnect packet to disconnect wireless client without message 'Radius disconnect request for uknown IP' ? I don't have any IP address since user was authenticated only by his mac address (mac authentication of wireless client).

??

Thanks
 
mknnoc
Trainer
Trainer
Posts: 229
Joined: Thu Feb 28, 2008 6:40 am
Location: cambodia

Re: Freeradius: Sending command to Mtk

Sun May 17, 2009 2:24 pm

01:30:46 hotspot,error,info,debug Radius disconnect with no ip provided
try to send disconnect packet with ip of the client. it will work.
 
User avatar
Tony Burton
newbie
Posts: 37
Joined: Sun Oct 23, 2005 11:02 am
Location: New Zealand
Contact:

Re: Freeradius: Sending command to Mtk

Thu Jan 21, 2010 9:14 am

Search the forums please. This has been discussed in detail, many, many time before. AFAIK, I made quite a substantial post about how this works and what is needed...
I've searched the forums and I can't find an answer to this.

What is the necessary syntax on a freeradius server for terminating a hotspot user session?

Tony

Who is online

Users browsing this forum: Bing [Bot], epanig, leviself56, pants6000, RaresC95, tangent, wispmikrotik and 61 guests