setting a captive portal using freeradius + mysql + apache -
can try tell me difficulty level of kind of wifi captive portal setup.
im knowledgeable in networking, not in php/mysql enough skills setup own webserver. , 4/10 knowledge in radius.
here's scenario
1) user directed in captive portal page upon connecting in guest_ssid
2) registration page appear , user input couple of fields (e.g email, name, etc.).
3) after submitting allow access network (valid 3hours 512kb bandwidth)
i understand needed ff:
- radius (accounting , bandwidth limitting)
- apache webserver
- mysql user storage
- pfsense redirection portal / wall garden
1) , so, followed guide in managed install freeradius mysql , apache. have table called radius
these tables
tables in radius
- radacct
- radcheck
- radgroupcheck
- radgroupreply
- radpostauth
- radreply
- radusergroup
as understand in document, should place accounts inside radcheck
table.
+----+----------+----------------+----+-------+ | id | username | attribute | op | value | +----+----------+----------------+----+-------+ | 1 | john | cleartext-pass | := | 12345 | +----+----------+----------------+----+-------+
2) inside /var/www/html login.php
login_success.php
check_login.php
check_login.php
$host="localhost"; // host name $username="root"; // mysql username $password=""; // mysql password $db_name="radius"; // database name $tbl_name="radcheck"; // table name // connect server , select databse. mysql_connect("$host", "$username", "$cleartext-pass")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select db");
!! php codes here working using other database; consisted table , user , password fields !!
i guess question is, how make php login work on freeradius using mysql user storage? - not sure if placed syntax/values correctly in php
and how implement session limit (3hours) , bandwidth limiting in freeradius?
Comments
Post a Comment