Beruflich Dokumente
Kultur Dokumente
I decide to create hotspot from my server to allow other connect to Internet for free. I used
“Captive portal” solution based on these applications:
CoovaChilli
FreeRadius
MySQL
daloRADIUS
When somebody wants to connect to Internet using my wifi, the first page he can see is the
register/login page (whatever page he wants to visit).
After registration/login he is able to connect to Internet.
Let’s have one server with two network interfaces – first (eth0) goes to Internet, the second one
(eth1) is the wifi for “unknown” clients.
Install CoovaChilli:
cd ..
dpkg -i coova-chilli_*_amd64.deb
Configure FreeRadius
Change /etc/freeradius/clients.conf:
client 127.0.0.1 {
secret = mysecret
}
Change /etc/freeradius/sql.conf:
server = "localhost"
login = "root"
password = "xxxx"
Uncomment in /etc/freeradius/sites-available/default:
authorize {
sql
}
accounting {
sql
}
Uncomment in /etc/freeradius/radiusd.conf:
$INCLUDE sql.conf
daloRADIUS configuration
Modify this file /var/www/daloradius/library/daloradius.conf.php
$configValues['CONFIG_DB_PASS'] = 'xxxx';
$configValues['CONFIG_MAINT_TEST_USER_RADIUSSECRET'] = 'mysecret';
$configValues['CONFIG_DB_TBL_RADUSERGROUP'] = 'radusergroup';
You also need to modify following configuration files to setup sign in web pages
/var/www/signup-*/library/daloradius.conf.php:
$configValues['CONFIG_DB_PASS'] = 'xxxx';
$configValues['CONFIG_DB_NAME'] = 'radius';
$configValues['CONFIG_DB_TBL_RADUSERGROUP'] = 'radusergroup';
$configValues['CONFIG_SIGNUP_SUCCESS_MSG_LOGIN_LINK'] = "<br />Click
<b>here</b>".
" to return to the Login page and
start your surfing<br /><br />";
$uamsecret = "uamsecret";
username: administrator
password: radius
Routing
We should not forget to enable packet forwarding and setup NAT:
CoovaChilli configuration
Let's start with /etc/chilli/defaults:
HS_NETWORK=192.168.10.0
HS_UAMLISTEN=192.168.10.1
HS_RADSECRET=mysecret
HS_UAMSECRET=uamsecret
HS_UAMFORMAT=https://\$HS_UAMLISTEN/hotspotlogin/hotspotlogin.php
HS_UAMHOMEPAGE=https://\$HS_UAMLISTEN
START_CHILLI=1
Maybe you need to execute chilli and radius server with some debug options to see "errors"
during client connection:
This how-to describe simple configuration of CoovaChilli so there are many things to configure.
I didn't mentioned anything about security - so it's up to you to tweak it yourself.
https://help.ubuntu.com/community/WifiDocs/CoovaChilli
Engoy...