2011-08-24 - [GRASE-Hotspot] Disconnect online user

Header Data

From: ????? ?????? <pa***s@yahoo.com>
Message Hash: ac3038e548acf5a554a0e3da0419f108980f4f6ed7ed5871a600cc8b1a117c1a
Message ID: <1314249600.80815.YahooMailNeo@web161612.mail.bf1.yahoo.com>
Reply To: N/A
UTC Datetime: 2011-08-24 22:20:00 UTC
Raw Date: Wed, 24 Aug 2011 22:20:00 -0700

Raw message

Hi, 



I just wanna share how to disconnect/kick online user and make applied it in grase admin page. We will use chilli to disconnect user.


1. first edit /etc/init.d/chilli to add listen port for disconnect packet by adding the line
DAEMON_ARGS="--coaport 3779"

so the first line would be like this:
#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/chilli
NAME=chilli
DESC=chilli
DAEMON_ARGS="--coaport 3779"

2. add coaport on /etc/chilli/hs.conf or in 


# TAG COA Port
coaport 3779

3. restart chilli


4. Don't forget to add sudo line to allow www-data permission on /etc/sudoers
www-data ALL=NOPASSWD:/bin/echo
www-data ALL=NOPASSWD:/usr/bin/radclient

5. test it first, try execute this in shellcommand
echo "User-Name=username" | radclient -x 127.0.0.1:3779 disconnect yourradiussecret

username is the username who want you kick out from grase.
yourradiussecret is radius secret, if u did not change it, the deflaut from grase is hotspotradius

6. or u can use php sript. (example)
$shell_command='sudo /bin/echo "User-Name='.kevin.'" | /usr/bin/radclient -x 127.0.0.1:3779 disconnect hotspotradius ';
$output = shell_exec($shell_command);

Thread