Re: Re: Importing Free Authorized Client lists into captive port

Home Page Forums Network Management ZeroShell Importing Free Authorized Client lists into captive portal Re: Re: Importing Free Authorized Client lists into captive port

#50294

miketheknife
Member

Hello Marc,

after one day of investigation, i came across a command that can be issued on the shell of ZS to insert a authorized free client into the captive portal.

use the following command:
/root/kerbynet.cgi/scripts/cpAddClient “Mike” “192.168.111.50” “00:13:A9:E8:D2:D6”

or in your case only the MAC address:
/root/kerbynet.cgi/scripts/cpAddClient “Mike” “” “00:13:A9:E8:D2:D6”

it should now be easy writing a shell script to loop through a uploaded textfile inserting all the mac addresses into the captive portal DB.

i have read that the maximum number of free clients is 100 (not tested by me yet) 🙁 .i have not done the complete ‘decryption’ 😉 of the article in the italian forum yet: http://www.zeroshell.net/forum/viewtopic.php?p=1462 they are talking about a workaround to this limitation.

== edit ==
here is how to remove the 100 limitation
http://www.zeroshell.net/eng/forum/viewtopic.php?t=2451
== /edit ==

with the above command i was able to insert clients, now i wanted to remove them.

i copied the /root/kerbynet.cgi/scripts/cpListFreeClients to /root/kerbynet.cgi/scripts/cpListFreeClientsMike (knowing the script will be gone after the next reboot)

and modified it accordingly:

the line 15:
echo “

$Desc $IP $MAC

i changed to:
echo “$C $Desc $IP $MAC”

NOTE: if you can interpret html output you dont have to copy the file and modify line 15

now i was able to list the existing free clients with my new script:

root@event-01 scripts> /root/kerbynet.cgi/scripts/cpListFreeClientsMike
00 Mike Any 00:13:A9:E8:D2:D6

and with the input from the command above i removed the entry “00” from the existing free client list:
/root/kerbynet.cgi/scripts/cpRemoveClient “00”

-mike