วันศุกร์ที่ 16 มกราคม พ.ศ. 2552

การ kick user ใน radius

การ kick user ที่ค้าง ในระบบ freeradius + chillispot
1.ตรวจสอบ user ว่า ใคร ได้ ip เบอร์อะไร เช่น
john# radwho
Login Name What TTY When From Location
mypun11859 mypun11859 shell S0 Thu 16:24 127.0.0.1 192.168.9.25
tongki28 tongki28 shell S1 Thu 16:05 127.0.0.1 192.168.9.24
gapsf11 gapsf11 shell S2 Thu 16:27 127.0.0.1 192.168.9.26
tjhirjhr tjhirjhr shell S4 Thu 15:59 127.0.0.1 192.168.9.9
ben ben shell S3 Thu 16:49 127.0.0.1 192.168.9.23
Arnon Arnon shell S5 Thu 15:05 127.0.0.1 192.168.9.11
kung kung shell S8 Thu 12:33 127.0.0.1 192.168.9.16
jam jam shell S9 Thu 16:30 127.0.0.1 192.168.9.17
water water shell S10 Thu 16:56 127.0.0.1 192.168.9.18

2.ใช้คำสั่งดังต่อไปนี้ ในการ kick user

Usage: radzap [options] server[:port] secret
-d raddb_directory: directory where radiusd.conf is located
-N nas_ip_address: IP address of the NAS to zap.
-P nas_port: NAS port that the user is logged into.
-u username: Name of user to zap (case insensitive).
-U username: like -u, but case-sensitive.
-x : more debugging output

เช่น

john# radzap -u tataza localhost testing123 ใช้ kick user ที่ชื่อ tataza ที่ค้างในระบบ

john# radzap -P 192.168.9.19 localhost testing123 ใช้ kick user ที่ IP 192.168.9.1 ที่ค้างในระบบ

ซึ่งบางครั้ง สั่ง kick ด้วย username ไม่ออก ก็ให้ kick ด้วย IP ตาม option ด้าบน

ไม่มีความคิดเห็น: