Difference between revisions of "CoovaChilli"

From ArchWiki
Jump to: navigation, search
(Mysql database setup)
(no idea why was this here)
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Network]]
+
[[Category:Networking]]
{{Article summary start}}
+
{{Article summary text|Covers installation and usage of ncmpcpp (ncmpc++)}}
+
{{Article summary heading|Related}}
+
{{Article summary wiki|mpd}} - Music Player Daemon
+
{{Article summary end}}
+
 
{{Stub|Work in progress :)}}
 
{{Stub|Work in progress :)}}
  
Line 11: Line 6:
 
= Installation =
 
= Installation =
 
Several other applications are required for an example setup of CoovaChilli:
 
Several other applications are required for an example setup of CoovaChilli:
{{bc|$ pacman -S freeradius nginx mariadb phpmyadmin php}}
+
{{bc|$ pacman -S freeradius nginx mariadb php}}
 
From the [[AUR]] install the following two packages: {{aur|daloradius}} and {{aur|coova-chilli}}.
 
From the [[AUR]] install the following two packages: {{aur|daloradius}} and {{aur|coova-chilli}}.
  
Line 17: Line 12:
 
Example configuration for a full and working CoovaChilli setup.
 
Example configuration for a full and working CoovaChilli setup.
 
Consider '''eth0''' is the interface for our incoming internet connection and '''eth1''' is the gateway interface for our unknown wifi clients and is coonnected to various hot-spots.
 
Consider '''eth0''' is the interface for our incoming internet connection and '''eth1''' is the gateway interface for our unknown wifi clients and is coonnected to various hot-spots.
 
+
== FreeRadius ==
* cp -r /var/www/daloradius/contrib/chilli/portal2/* /var/www/
+
== Daloradius ==
+
{{bc|<nowiki>$ /usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
+
$ rm /usr/share/nginx/html/index.html
+
$ cp -r /usr/share/webapps/daloradius/contrib/chilli/portal2/* /usr/share/nginx/html/</nowiki>}}
+
 
+
== FreeRadius setup ==
+
 
{{hc|/etc/raddb/clients.conf|
 
{{hc|/etc/raddb/clients.conf|
 
<nowiki>client 127.0.0.1 {
 
<nowiki>client 127.0.0.1 {
Line 58: Line 46:
 
$ mysql -u root -p radius < /usr/share/nginx/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql</nowiki>
 
$ mysql -u root -p radius < /usr/share/nginx/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql</nowiki>
 
}}
 
}}
== daloRADIUS configuration ==
 
  
== CoovaChilli configuration ==
+
== CoovaChilli ==
 
{{hc|/etc/chilli/defaults|
 
{{hc|/etc/chilli/defaults|
 
<nowiki>HS_NETWORK=192.168.10.0
 
<nowiki>HS_NETWORK=192.168.10.0
Line 71: Line 58:
 
}}
 
}}
  
== Start and enable applications ==
+
== daloRADIUS ==
 +
{{bc|<nowiki>$ rm /usr/share/nginx/html/index.html
 +
$ cp -r /usr/share/webapps/daloradius/contrib/chilli/portal2/* /usr/share/nginx/html/</nowiki>}}
 +
Adjust the following config values:
 +
{{hc|/usr/share/nginx/html/daloradius/library/daloradius.conf.php|
 +
<nowiki>$configValues['CONFIG_DB_PASS'] = 'xxxx';
 +
$configValues['CONFIG_MAINT_TEST_USER_RADIUSSECRET'] = 'mysecret';
 +
$configValues['CONFIG_DB_TBL_RADUSERGROUP'] = 'radusergroup';</nowiki>
 +
}}
 +
Also in these several files:
 +
{{hc|/usr/share/nginx/html/signup-*/library/daloradius.conf.php|
 +
<nowiki>$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 />";</nowiki>
 +
}}
 +
 
 +
= Start and enable applications =
 
Create a systemd [[Systemd/Services#coova-chilli|service file]] for coova-chilli.
 
Create a systemd [[Systemd/Services#coova-chilli|service file]] for coova-chilli.
 
{{bc|$ systemctl enable nginx freeradius mysqld coova-chilli
 
{{bc|$ systemctl enable nginx freeradius mysqld coova-chilli

Revision as of 00:11, 25 May 2013

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: Work in progress :) (Discuss in Talk:CoovaChilli#)

Introduction

http://coova.org/CoovaChilli

Installation

Several other applications are required for an example setup of CoovaChilli:

$ pacman -S freeradius nginx mariadb php

From the AUR install the following two packages: daloradiusAUR and coova-chilliAUR.

Example configuration

Example configuration for a full and working CoovaChilli setup. Consider eth0 is the interface for our incoming internet connection and eth1 is the gateway interface for our unknown wifi clients and is coonnected to various hot-spots.

FreeRadius

/etc/raddb/clients.conf
client 127.0.0.1 {
 secret     = mysecret
}

Adjust the following settings:

/etc/raddb/sql.conf
        server = "localhost"
        login = "root"
        password = "xxxx"

Uncomment the following settings:

/etc/freeradius/sites-available/default
authorize {
          sql
}

accounting {
         sql
}

Uncomment the following settings:

/etc/freeradius/radiusd.conf
       $INCLUDE sql.conf

Mysql database setup

Setup MariaDB and choose a password for the mysql root user.

$ mysql -u root -p
mysql> CREATE DATABASE radius;
mysql> exit
$ mysql -u root -p radius < /usr/share/nginx/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql

CoovaChilli

/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

daloRADIUS

$ rm /usr/share/nginx/html/index.html
$ cp -r /usr/share/webapps/daloradius/contrib/chilli/portal2/* /usr/share/nginx/html/

Adjust the following config values:

/usr/share/nginx/html/daloradius/library/daloradius.conf.php
$configValues['CONFIG_DB_PASS'] = 'xxxx';
$configValues['CONFIG_MAINT_TEST_USER_RADIUSSECRET'] = 'mysecret';
$configValues['CONFIG_DB_TBL_RADUSERGROUP'] = 'radusergroup';

Also in these several files:

/usr/share/nginx/html/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 />";

Start and enable applications

Create a systemd service file for coova-chilli.

$ systemctl enable nginx freeradius mysqld coova-chilli
$ systemctl start nginx freeradius mysqld coova-chilli

Also read