Cr e a t i ngaCa pt ur ePo r t a l us i ngCo o v a Chi l l i , F r e e Ra di us , a ndMy SQL Se ct i ons
Obj ec t i v e Requi r eme ment s I ns t al l Ubunt u I ns t al l Fr eeRadi us T es tFr ee Ra di u s I ns t al l Coov aChi l l i Co nfi g ur eCo ov a Ch i l l i Cust omi mi zeLogi nPage UseMy MySQLf orFr eeRadi usUserConfigur at i on TestFr eeRadi usMy MySQLUserConfigur at i on Li mi tAccessTi mePerUser Li mi tAccessTi mePerDevi ce( MAC)Addr ess
• • • •
• • • •
•
• • • • • •
Obj ec t i v es Cr eat eac apt ur epor t al t hatwi l l al l owus er shav eac ces st ot heI nt er net Li mi tunaut hent i c at edus er sI nt er netac c es st oas pec i fi edt i me Us eac c es sc odest os etadi ff er entac c es st i mel i mi t On l yoneus erpe rac c es sc odear eal l o wedt ol ogi n Requi r eme ment s Ub un t u12 . 0 4. 1L TS Coo v aChi l l i PCwi t h2Net wor kCar d I nt er netAc c es s I nst al lUbunt u Downl oadacopyofUbunt u12. 04LTS f r o m ht t p: / / www. ubunt u. c om/ do wnl oad/ des k t op Bur nt heI SO i mageont oaCD I n s er tt h eCDi nt h eCDDr i v e St ar tt h ec o mp mpu t e r Wa i tf orUbu nt ut ob oo tf r om t h eCD Cl i c k“ I ns t al l Ubunt u” Cl i c k“ Cont i nue”
•
• • • • • • • •
• • • •
•
•
•
•
•
•
•
•
Sel ec tt heopt i ont oer as et hec ont entoft hedi s kandi ns t al l Ubunt u.Cl i c k “ Cont i nue” Cl i c k“ I ns t al l Now” Sety ourt i mez onet henc l i c k“ Cont i nue” Sel ec tappr opr i at ek ey boar dl ay outt henc l i c k“ Cont i nue” T y p ey o urn ame ,c o mp ut e rn ame ,l o gi nna me ,a ndpa s s wo r d .Cl i c k“ Co nt i n ue ” Wai tunt i l Ubunt ufi ni s hescopy i ngt hefi l es Cl i c k“ Res t ar t ” Re mo v eCDf r o m Dr i v et h enc l i c kp r e s sEn t e r Wai tf ort hec omput ert or es t ar t Addi t i onalSof t war eI nst al l at i on L og i nus i n gt heus er na meandpa ss wo r dy oupr o v i de de ar l i er Cl i c kont heUbunt oI c onandt y pe“ T er mi nal ”i nt hes ear c hbo x Cl i c kt heT er mi nal Updat et hesour cepackages s udoapt ge tupdat e I ns t al l t as k sel s udoapt geti ns t al l t as ks el Ru nt as k s el an ds el ec tLAMPs er v e rt h enc l i c kOK s u dot a s k s el Whe na sk e df o r“ Ne wp as s wo r df ort h eMYSQL‘ r oo t ’ u ser ”us emy s q l s e cr e t( t h i s pas s wor di sus ef ort hi sdoc ument at i on.Changet hi sf orpr oduc t i onus e) I nst al landConfigur eFr eeRadi us I ns t al l Fr eeRadi us s udoapt geti ns t al l f r eer adi us TestFr eeRadi us Uncommentl i ne90 “ J ohnDoe” Cl ear t e xt Pas s wor d: =“ hel l o” andl i ne91 Re pl y Me s s a ge=“ He l l o ,%{ Us e r Na me } ” i n/ et c / f r eer adi us / us er s Re st ar tFr e eRa di u s / et c / i ni t . d/ f r eer adi usr es t ar t
Us er adt es tt ot es tFr eeRadi us r adt es t“ J ohnDoe”hel l o127. 0. 0. 10t es t i ng123 Theout puts houl dbes i mi l art ot hi s
Sen di ngAc c es s Re qu es tofi d1 53t o1 27 . 0. 0. 1p or t1 81 2 User Name=“ JohnDoe” Us er Pa s swo r d=“ he l l o ” NASI PAd dr e ss=127 . 0. 1 . 1 NASPor t=0
•
I nst al lCoovaChi l l i Asandor di nar yus er ,dot hef ol l owi ng s udoapt geti ns t al l l i bs s l dev
s udoapt geti ns t al l has er l c d mk di rc hi l l i c dc hi l l i wgetht t p: / / ap. c oov a. or g/ c hi l l i / c oov ac hi l l i 1. 3. 0. t ar . gz t arx z v fc oov ac hi l l i 1. 3. 0. t ar . gz c dcoov ac hi l l i 1. 3. 0 . / c onfi gur e–pr efi x =–enabl el ar gel i mi t s–enabl emi ni por t al –wi t hopens s l mak e s u domak ei n st a l l Configur eCoovaChi l l i
sudosu– c d/ et c / c hi l l i c pdef aul t sc onfi g echoi pt abl esIPOSTROUTI NG tnato\ $HS_WANI Fj MASQUERADE>>i pup. sh / et c / i ni t . d/ c hi l l i s t ar t&&/ et c / i ni t . d/ c hi l l i s t op T e stCoo va Chi l l i Conn ec te t h0t ot heLANorde vi c et hathasac c es st ot hei nt er ne t
Sett hedef aul tgat ewayt ot heI Poft heI nt er netgat ewayt hati sl oc at edi net h0’ sLAN Conn ec te t h1t oanac c es spoi ntors wi t c h Mak es ur et ha tDHCPs er v i c ei sd i s ab l e di nt heab ov e me nt i o ne da cc e ssp oi n t St ar tCoov aChi l l i Us i ngat abl e t ,p honeorapc ,c onnec tt ot heac c es spoi nt Ope na nI nt er n etbr o ws era ndg ot oa nys i t e Yous houl dber edi r ec t edt ot hec apt ur epor t al ’ sl ogi npage
•
•
•
•
•
•
•
Whenchec k i ngwhoi sl ogg edi n,s ome t i mesr adwhowi l l gi v et hi ser r or r adwho:Er r orr eadi ng/ v ar / l og/ f r eer adi us / s r adut mp:Nos uc hfi l eordi r ec t or y T ofi xi t ,unc omments r adut mpi nt heac count i ngs ec t i onof/ et c / f r eer adi us / s i t es av ai l abl e/ def aul tt henr es t ar tf r eer adi us Cust omi zeLogi nPage UseMySQLf orFr eeRadi usUserConfigur at i on I ns t a l lRe qui r e dPa ck age s My SQLi sal r eadyi ns t al l ed.Al l weneedi st oi ns t al l Fr eeRadi us ’ sMy SQLpac k age s udoapt geti ns t al l f r eer adi us my sql Configur eMySQLDat abasef orFr eeRadi us Cr e at ead at a ba sef o rFr eeRad i u st ou s e my s ql admi nur oo tpmy s qs ec r e tc r eat er adi us
Cr eat eaus ert hatwi l l ha veac ces st ot her adi usdat abas e.We ’ l l us eonepr o vi ded i nFr eeRadi us’ sMySQLpackage my sql ur ootpmy sql s ec r et et c / f r eer adi us / s ql / my sql / admi n. s ql Cr eat et het abl es my sql ur ootpmy sql s ec r etr adi us et c / f r eer adi us / s ql / my sql / s chema. s ql Ad dat e s tu s er my s ql ur oo tpmy s ql s ec r etr adi use“ I NSERTI NTO r adc hec k( us er name,at t r i but e,op, v al ue)VALUES( ‘ al i c e’ ,‘ Cl ear t ex t Pas swor d’ ,‘ : =’ ,‘ pas swor d’ ) ” Configur eFr eeRadi us Uncommentt hel i ne$I NCLUDEsql . conf i n/ et c / f r eer adi us / r adi us d. c onf Uncommentt hel i nesql i nt heaut hor i z es ec t i onof/ et c / f r eer adi us / s i t es av ai l abl e/ def aul t( bydef aul tt hi si si nl i ne 159)
•
•
•
TestFr eeRadi usMySQLUserConfigur at i on Re st ar tFr e eRa di u s / et c / i ni t . d/ f r eer adi usr es t ar t
Us er adt es tt ol ogi nasal i c e r adt es tal i c epas swor d127. 0. 0. 10t es t i ng123 Ther es ul ts houl dl ooks omet hi ngl i k e Sen di ngAc c es s Re qu es tofi d1 99t o1 27 . 0. 0. 1p or t1 81 2 Us e r Na me=“ a l i c e ” User Passwor d=“ passwor d” NASI PAd dr e ss=127 . 0. 1 . 1 NASPor t=0 r ad_r ec v :Ac c es s Ac c eptpac k etf r om hos t127. 0. 0. 1por t1812,i d=199,l engt h=20 Li mi tAccessTi mePerUser
Li mi t i ngt het i meaus ec anac c es st heI nt er neti sdonebybas i c al l yr et ur ni nganAVPof Ses s i onTi meout .Butus i ngt hi saus erc anj us tl ogbac ki nagai n.T opr ev entt hi sa c ount eri sus ed. Si n ceweal r ea dyh av eFr e eRad i u s ’ sMy SQLpac k ag e,we ’ l l us et h es ql c ou nt er .Our c ount erwi l l r es ett hec ountonadai l ybas i st husaus erc anagai nus ehi sac c ountont he n ex td ay •
Open/ et c / f r eer adi us / di c t i onar yandappendt hel i nes ATTRI BUTE Dai l ySessi onTi me 3000 i nt eger ATTRI BUTE MaxDai l ySessi on 3001 i nt eger Uncommentt hel i ne
•
s ql i nt heac c ount i ngs ec t i onof/ et c / f r eer adi us / s i t es av ai l abl e/ def aul t( bydef aul tt hi si si nl i ne 388) •
Open/ et c / f r eer adi us / s ql / my sql / c ount er . c onandc hanget hes ql di r ec t i v eof dai l y count erf r om t hi s :
quer y=“ SELECTSUM( acct sessi ont i me–\ GREATEST( ( %b–UNI X_TI MESTAMP( acct st ar t t i me) ) ,0) )\ FROM r ada c c tWHEREus er name=‘ %{ %k } ’ AND\ UNI X_ TI MEST AMP( a c c t s t a r t t i me )+a c c t s e s s i o nt i me>‘ %b ' ” t ot hi s : quer y=“ SELECTI FNULL( SUM( acct sessi ont i me–\ GREATEST( ( %b–UNI X_TI MESTAMP( acct st ar t t i me) ) ,0) ) , 0)\ FROM r ada c c tWHEREus er name=‘ %{ %k } ’ AND\ UNI X_ TI MEST AMP( a c c t s t a r t t i me )+a c c t s e s s i o nt i me>‘ %b ' ”
•
Open/ et c / f r eer adi us / s i t es av ai l abl e/ def aul tandaddt hel i ne dai l y count er j us tbel owdai l yi nt heaut hor i z es ec t i on( t hi ss houl dbei nl i ne175)
•
•
Uncommentt hel i ne $ I NCL UDEs ql / my s q l / c ou nt e r . c on f i n/ et c / f r eer adi us / r adi us d. c onf( t hi si satl i ne695)
Adda15mi nut el i mi tt ot es t us erac c ount
my s ql ur oo tpmy s ql s ec r etr adi use“ I NSERTI NTO r adc hec k( us er name,at t r i but e,op, v al ue)v al ues( ‘ t es t us er ’ ,‘ Max Dai l y Ses s i on’ ,‘ : =’ ,1800) ”
•
Re st ar tFr e eRa di u s