Menu

kick user off wifi not working

Help
2015-01-20
2021-01-04
  • Lutfi J Widayanto

    Hi,
    I just wondering why the kick user off function in Radiusdesk is not working.
    I'm using the following system:
    Ubuntu 14.04.1
    Nginx web server
    Freeradius 2
    Coovachilli
    All installed on the same box.

    The Radiusdesk returned "Item updated succesfully" but the user still able to surf the internet.

    Rgds,
    Lutfi

     
  • Vikas Sharma

    Vikas Sharma - 2016-02-21

    bumping as I am facing same problem.

     
  • neXus

    neXus - 2016-05-12

    I am facing the same problem, i tried to do it manually and it worked perfeclty.
    I stopped radius service just to start it in debug mode (freeradius -X ) and i issued the command

    root@wifiserver# echo "User-Name='sl_4_10209494202578596'" |radclient -c '1' -n '3' -r '3' -t '3' -x '10.20.30.2:3799' 'disconnect' 'testing123'

    FreeRadius response:
    Sent Disconnect-Request Id 94 from 0.0.0.0:54822 to 10.20.30.2:3799 length 44
    User-Name = "sl_4_10209494202578596"
    Received Disconnect-ACK Id 94 from 10.20.30.2:3799 to 0.0.0.0:0 length 20

    The user is not more in activity monitor.
    The user sl_4_10209494202578596 is a facebeook user. my 10.20.30.x is a pptp vpn.

    I have not checked the code but it could be something related to it, i would like to know if we are the only ones to face this problem.
    Cheers.

     
  • ryan low

    ryan low - 2016-05-12

    hi neXus, your NAS setup as direct or dynamic? I found out RD have a quite tricky part. if your NAS setup as direct but you insert your NAS id in that profile, it will treat it as dynamic. your NAS need to fetch heartbeat back to the RD (if you are using mikrotik).

     
    • neXus

      neXus - 2016-05-12

      Hi Ryan, i am using pptp connection on wr841n V10 customized firware.

       
  • Dirk van der Walt

    Hi guys,

    There is a CakePHP component called KickerComponent.php which decides how the kick action will take place.

    This descision is based on the value of the type field in the nas table.
    See the following snippet.

    //_____ Direct Connected Clients _____
            $q_r                = ClassRegistry::init('Na')->findByNasname($nas_ip);
    
            if($q_r){
    
                //Check the type
                $type = $q_r['Na']['type'];
                //======================================================================================
                //=======Different Types of NAS devices Require different type of disconnect actions====
                //======================================================================================
                if(($type == 'CoovaChilli-AP')|($type == 'CoovaChilli')){
    
                    //Check the port of the device's COA
                    $port   = $q_r['Na']['ports'];
                    $secret = $q_r['Na']['secret'];
    
                    //Send the NAS a POD packet
                    //-------------------------------------------
                    if($nas_ip == '0.0.0.0'){   //This is a hack for Chillispot since it reports 0.0.0.0
                        $nas_ip='127.0.0.1';
                    }
                    //Now we can attempt to disconnect the person
                    $output = array();
                    //Get the location of the radpod script
                    // print("Disconnecting $username");
                    //You may need to fine-tune the -t and -r switches - See man radclient for more detail
                    $rc = $this->radclient;
    
                    //Just send both to the device to be sure...
                    //Coova wants the device to be UC
                    $device_mac = strtoupper($device_mac);
                    exec("echo \"User-Name = $device_mac\"  | $rc -r 2 -t 2 $nas_ip:$port 40 $secret",$output);
                    exec("echo \"User-Name = $username\"    | $rc -r 2 -t 2 $nas_ip:$port 40 $secret",$output);
                    //----------------------------------------------
                }
    

    Try setting the type to CoovaChilli or CoovaChilli-AP and see if this fixes the problem.

    Let us know.

    Cheers

     
    • Sergio

      Sergio - 2021-01-04

      Hi i have the AP in a raspberry pi and the RD in a VM apart, all connect well but the kick command not. Can you help me? Thanks

      Edit: finally i could do it with the coaport option, but cant kick from the terminal/mobile, the user cant navigate but he dont know it unless he try it. How i can reset the mobile/wifi conecction?

       

      Last edit: Sergio 2021-01-05

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.