unissoft-bj / ihostsvc

system services & data services on ihost
0 stars 0 forks source link

用ip反查mac / 接通internet /关闭internet的命令行 #40

Open unissoft-bj opened 9 years ago

unissoft-bj commented 9 years ago

查询mac chilli_query list

返回值:多行string 00-75-E6-66-42-E8 172.16.0.102 dnat 54eb30a000000002 0 - 0/0 0/0 0/0 0/0 0 0 0/0 0/0 http://172.16.0.1:3990/favicon.ico 00-73-E0-67-42-E2 172.16.0.101 pass 54eb35ba00000001 1 user1 28/86400 27/300 324/0 324/0 0 0 0%/1280000 0%/2560000 http://m.weibo.cn/?wm=ig_1002&from=index&s2w=index

说明: MAC Address, IP Address, internal chilli state (dnat, pass, etc), the session id (used in Acct-Session-ID), authenticated status (1 authorized, 0 not), user-name used during login, duration / max duration, idle time / max idle time, input octets / max input octets, output octets / max output octets, max total octets, status of option swapoctets, bandwidth limitation information, and the original URL

接通internet chilli_query authorize ip 172.16.0.105 sessiontimeout 86400

86400为24小时 无返回值,可通过 chilli_query list 查询状态改变

关闭internet chilli_query logout 00-73-E0-67-42-E2

无返回值,可通过 chilli_query list 查询状态改变

michaelyin commented 9 years ago

set up user wms which can run chilli_query without password

sudo usermod -a -G chilli wms

sudo chown root:chilli chilli_query chmod u+s chilli_query