This document provides instructions for setting up a Wi-Fi hotspot on a Debian server using CoovaChilli, FreeRadius, MySQL, and daloRADIUS. Key steps include installing the necessary software, configuring FreeRadius and MySQL to work with daloRADIUS, configuring CoovaChilli, enabling packet forwarding and NAT, and creating web pages for login, signup, and administration. The hotspot allows users to connect to the internet after registering and logging in through the captive portal.
This document provides instructions for setting up a Wi-Fi hotspot on a Debian server using CoovaChilli, FreeRadius, MySQL, and daloRADIUS. Key steps include installing the necessary software, configuring FreeRadius and MySQL to work with daloRADIUS, configuring CoovaChilli, enabling packet forwarding and NAT, and creating web pages for login, signup, and administration. The hotspot allows users to connect to the internet after registering and logging in through the captive portal.
This document provides instructions for setting up a Wi-Fi hotspot on a Debian server using CoovaChilli, FreeRadius, MySQL, and daloRADIUS. Key steps include installing the necessary software, configuring FreeRadius and MySQL to work with daloRADIUS, configuring CoovaChilli, enabling packet forwarding and NAT, and creating web pages for login, signup, and administration. The hotspot allows users to connect to the internet after registering and logging in through the captive portal.
Debian Wi-Fi hotspot using CoovaChilli, FreeRadius,
MySQL and daloRADIS
March 24th, 2010 | Tags: CoovaChilli, daloRADIUS, debia, !reeRadi"s, hots#ot, M$S%&, 'AT, et(or), ro"tig, (i*+i I decide to create hots#ot +ro, ,$ server to allo( other coect to Iteret +or +ree- I "sed .Ca#tive #ortal/ sol"tio based o these a##licatios: CoovaChilli !reeRadi"s M$S%& daloRADIUS 0he so,ebod$ (ats to coect to Iteret "sig ,$ (i+i, the +irst #age he ca see is the register1logi #age 2(hatever #age he (ats to visit3- A+ter registratio1logi he is able to coect to Iteret- So let4s see ho( I did it- &et4s have oe server (ith t(o et(or) iter+aces 5 +irst 2eth03 goes to Iteret, the secod oe 2eth13 is the (i+i +or .")o(/ cliets- Istall basic so+t(are: aptitude install mysql-server phpmyadmin freeradius freeradius-utils freeradius-mysql apache2 php-pear php-db a2enmod ssl a2ensite default-ssl service apache2 restart cd /tmp && wget 'http://downloads.sourceforge.net/project/daloradius/daloradius/daloradius- 0.-!/daloradius-0.-!.tar.g"' tar #v"f daloradius-0.-!.tar.g" mv /tmp/daloradius-0.-! /var/www/daloradius chown -$ www-data:www-data /var/www/daloradius cp -r /var/www/daloradius/contrib/chilli/portal2/* /var/www/ rm /var/www/inde#.html 6eca"se ,$ ,achie is 74 bit I eed to b"ild CoovaChilli #ac)age ,$sel+: aptitude --assume-yes install dp%g-dev debhelper libssl-dev cd /tmp wget -c http://ap.coova.org/chilli/coova-chilli-&.2.2.tar.g" tar #"f coova-chilli*.tar.g" cd coova-chilli* dp%g-buildpac%age -rfa%eroot Istall CoovaChilli: cd .. dpkg -i coova-chilli'*'amd().deb Con!igure FreeRadius Chage /etc/freeradius/clients.conf: client &2*.0.0.& { secret + mysecret } Chage /etc/freeradius/sql.conf: server + ,localhost, login + ,root, password + ,####, Uco,,et i /etc/freeradius/sites-available/default: authori"e { sql }
accounting { sql } Uco,,et i /etc/freeradius/radiusd.conf: -./01234 sql.conf Con!igure MySQL database !or FreeRadius mysql -u root --password+#### mysql> 0$4564 35657584 radius9 mysql> exit
mysql -u root --password+#### radius < /var/www/daloradius/contrib/db/fr2- mysql-daloradius-and-freeradius.sql daloRADIS "on!iguration Modi+$ this +ile /var/www/daloradius/library/daloradius.conf.php -config:alues;'0</=.>'37'?588'@ + '####'9 -config:alues;'0</=.>'A5./6'6486'284$'$53.28840$46'@ + 'mysecret'9 -config:alues;'0</=.>'37'671'$53284$>$<2?'@ + 'radusergroup'9 8o" also eed to ,odi+$ +ollo(ig co+ig"ratio +iles to set"# sig i (eb #ages /var/www/signup-*/library/daloradius.conf.php: -config:alues;'0</=.>'37'?588'@ + '####'9 -config:alues;'0</=.>'37'/5A4'@ + 'radius'9 -config:alues;'0</=.>'37'671'$53284$>$<2?'@ + 'radusergroup'9 -config:alues;'0</=.>'8.>/2?'8200488'A8>'1<>./'1./B'@ + ,Cbr /D0lic% CbDhereC/bD,. , to return to the 1ogin page and start your surfingCbr /DCbr /D,9 Chage lies i /var/www/signup*/index.php to 2chaged 9User*:ass(ord9 *; 9Clearte<t* :ass(ord9 ad 9==9 *; 9:=93: -sql + ,./84$6 ./6< ,.-config:alues;'0</=.>'37'671'$530E40B'@., FidG 2sernameG 5ttributeG opG :alueH ,. , :51248 F0G '$username'G '0learte#t- ?assword'G ':+'G '$password'H,9 Aother +ile eed to be ,odi+ied to co,,"icate (ith CoovaChilli is /var/www/hotspotlogin/hotspotlogin.php -uamsecret + ,uamsecret,9 'o( $o" sho"ld be able to reach daloRADIUS istallatio o htt#:1112>-0-0-11daloradi"s1 username: administrator password: radius Routing 0e sho"ld ot +orget to eable #ac)et +or(ardig ad set"# 'AT: iptables -t nat -5 ?<86$<26./> -o eth0 -j A58I24$534 echo & > /proc/sys/net/ipv)/ip'forward sed --in-place+.old 's/JKLFnet.ipv).ip'forward+&LH/L&/' /etc/sysctl.conf sysctl -p CoovaChilli "on!iguration &et9s start (ith /etc/chilli/defaults: E8'/46M<$B+&2.&(!.&0.0 E8'25A1.864/+&2.&(!.&0.&
E8'$53840$46+mysecret E8'25A840$46+uamsecret E8'25A=<$A56+https://L-E8'25A1.864//hotspotlogin/hotspotlogin.php E8'25AE<A4?5>4+https://L-E8'25A1.864/ The do9t +orget to eable CoovaChilli to start i /etc/default/chilli 865$6'0E.11.+& Ma$be $o" eed to e<ec"te chilli ad radi"s server (ith so,e deb"g o#tios to see ?errors? d"rig cliet coectio: chilli --fg --debug freeradius -N !e( li)s (e created: htt#:111@2-17A-10-11sig"#*+ree1 * sig "# #age 2i+ $o" do9t have "sera,e1#ass(ord3 htt#:111@2-17A-10-1:B@@01#relogi * "se +or logi to $o"r #ortal htt#:111@2-17A-10-11daloradi"s1 * daloradi"s ad,i #age htt#:111@2-17A-10-11#h#,$ad,i1 * #h#,$ad,i #age 2"se+"l +or sCl database3 This ho(*to describe si,#le co+ig"ratio o+ CoovaChilli so there are ,a$ thigs to co+ig"re- I did9t ,etioed a$thig abo"t sec"rit$ * so it9s "# to $o" to t(ea) it $o"rsel+- 8o" ca +id additioal i+o o this (eb #age: htt#s:11hel#-"b"t"-co,1co,,"it$10i+iDocs1CoovaChilli Dgo$---