Difference between revisions of "WiFi: HotSpot - Instalasi CoovaChilli"

From OnnoWiki
Jump to navigation Jump to search
(New page: Install CoovaChilli There are two methods of installing coovachilli on ubuntu. * Package * Source Both methods are listed below CoovaChilli Package Installation To install th...)
 
Line 183: Line 183:
 
#
 
#
 
HS_UAMSERVICE=https://10.1.0.1/cgi-bin/hotspotlogin.cgi
 
HS_UAMSERVICE=https://10.1.0.1/cgi-bin/hotspotlogin.cgi
 +
 +
 +
 +
==Pranala Menarik==
 +
 +
* [[WiFi: HotSpot - CoovaChilli Pendahuluan]]
 +
* [[WiFi: HotSpot - CoovaChilli Kebutuhan Hardware dan Software]]
 +
* [[WiFi: HotSpot - CoovaChilli Instalasi Radius Server]]
 +
* [[WiFi: HotSpot - Instalasi CoovaChilli]]
 +
* [[WiFi: HotSpot - CoovaChilli Instalasi Firewall]]
 +
* [[WiFi: HotSpot - CoovaChilli Instalasi Apache dan SSL]]
 +
* [[WiFi: HotSpot - CoovaChilli Fitur dan Keterangan Tambahan]]
 +
* [[WiFi: HotSpot]]

Revision as of 09:45, 7 April 2010

Install CoovaChilli

There are two methods of installing coovachilli on ubuntu.

   * Package
   * Source 

Both methods are listed below

CoovaChilli Package Installation

To install the CoovaChilli package, first download it (or the latest version available from http://www.coova.org/CoovaChilli):

sudo wget http://ap.coova.org/chilli/coova-chilli_1.0.13-1_i386.deb

Then install it:

sudo dpkg -i coova-chilli_1.0.13-1_i386.deb

Copy the default configuration files and Apache site configuration:

cp /etc/chilli/defaults /etc/chilli/config mkdir /var/www/hotspot cd /var/www/hotspot cp /etc/chilli/www/* /var/www/hotspot mkdir /var/www/hotspot/images cp /var/www/hotspot/coova.jpg /var/www/hotspot/images/ mkdir /var/www/hotspot/uam cd /var/www/hotspot/uam wget http://ap.coova.org/uam/ wget http://ap.coova.org/js/chilli.js

Change Host Address

Edit index.html to use chilli.js from local (this example uses the host IP address as 10.1.0.1)

sed -i 's/ap.coova.org\/js\/chilli.js/10.1.0.1\/uam\/chilli.js/g' /var/www/hotspot/uam/index.html

Edit ChilliLibrary.js to use the correct host IP address (again, example uses 10.1.0.1):

sed -i 's/192.168.182.1/10.1.0.1/g' /etc/chilli/www/ChilliLibrary.js sed -i 's/192.168.182.1/10.1.0.1/g' /var/www/hotspot/ChilliLibrary.js

To enable coovachilli change START_CHILLI to 1

nano -w /etc/default/chilli

To enable on reboot

START_CHILLI=1 CONFFILE="/etc/chilli.conf"

To enable without a reboot

sudo /etc/init.d/chilli start

CoovaChilli Source Installation

To build from source:

sudo apt-get install build-essential linux-headers-server wget http://ap.coova.org/chilli/coova-chilli-1.0.13.tar.gz tar xzf coova-chilli-1.0.13.tar.gz && cd coova-chilli-1.0.13 ./configure make sudo make install

Copy the default configuration files and Apache site configuration:

cp /etc/chilli/defaults /etc/chilli/config mkdir /var/www/hotspot cd /var/www/hotspot cp /etc/chilli/www/* /var/www/hotspot mkdir /var/www/hotspot/uam cd /var/www/hotspot/uam wget http://ap.coova.org/uam/ wget http://ap.coova.org/js/chilli.js

Edit index.html to use chilli.js from local (default is 192.168.2.1 for few networks and many hosts)

sed -i 's/ap.coova.org\/js\/chilli.js/192.168.2.1\/uam\/chilli.js/g' /var/www/hotspot/uam/index.html

The startup script:

cd /etc/init.d/ wget http://dev.coova.org/svn/coova-chilli/debian/coova-chilli.chilli.init mv chilli chilli.bak && mv coova-chilli.chilli.init chilli && chmod 755 chilli sed '21,30s/**/# &/' chilli > chilli.tmp && mv chilli.tmp chilli && chmod 755 chilli

the last command comments out the lines 21 to 30

please check the startup file for your special paths and start chilli with

sudo /etc/init.d/chilli start

To enable our chilli start up script at boot.

update-rc.d chilli defaults

We also need to make our chilli file executable by using the following command.

chmod +x /etc/init.d/chilli

Basic Configuration

See /etc/chilli/defaults file for details on possible configurations. Copy this to a new file called "config" (in the same directory) and edit the settings. To load the settings and start chilli, run "/etc/init.d/chilli start". This will generate main.conf, local.conf, and hs.conf files in /etc/chilli/ for you. In order to make changes to the settings at a later date, rerun chilli start.

NOTE: the chilli config file only generates the main.conf if the service is restarted by /etc/init.d/chilli which we start to configure now. When you start chilli in debug mode by entering "chilli --debug --fg" then coovachilli gets started with the main.conf. If you change the config file and restart chilli in debug mode nothing would change. So you can ether edit the main.conf and edit in debug mode or edit the config file and restart the service

Per default, it is assumed that Ethernet device eth0 is your connection to the Internet and eth1 is the interface you want to have clients (subscribers) on. If this is not the case, then change the HS_WANIF configuration to be your Internet connected device and HS_LANIF to be your WiFi device, for example. With the right devices configured, restart chilli and you are on your way.

nano /etc/chilli/config

Edit the first 63 lines of the file to the following until the HS_UAMSERVICE url is defined.

  1. -*- /bin/sh -*-
  2. Coova-Chilli Default Configurations.
  3. To customize, copy this file to /etc/chilli/config
  4. and edit to your liking. This is included in shell scripts
  5. that configure chilli and related programs before file 'config'.
  1. HS_WANIF=eth0 # WAN Interface toward the Internet

HS_LANIF=eth1 # Subscriber Interface for client devices HS_NETWORK=10.1.0.0 # HotSpot Network (must include HS_UAMLISTEN) HS_NETMASK=255.255.255.0 # HotSpot Network Netmask HS_UAMLISTEN=10.1.0.1 # HotSpot IP Address (on subscriber network) HS_UAMPORT=3990 # HotSpot Port (on subscriber network)

  1. Allow some additional local ports (used in the up.sh script when
  2. setting the firewall for the created tun/tap)

HS_TCP_PORTS="80 443"

  1. HS_DYNIP=
  2. HS_DYNIP_MASK=255.255.255.0
  3. HS_STATIP=
  4. HS_STATIP_MASK=255.255.255.0
  5. HS_DNS_DOMAIN=
  6. if your interface eth0 for example has the ip 192.168.5.2
  7. and your router where your internet connection is established has the address
  8. 192.168.5.1 than you are allowed to access the router from your wlan network 192.168.2.0/24
  9. so you have don't have to define the dns servers below
  10. HS_DNS2=62.72.64.237
  11. HS_DNS1=192.168.2.1
  1. HotSpot settings for simple Captive Portal

HS_NASID=nas01 HS_UAMSECRET=uamsecret HS_RADIUS=127.0.0.1 HS_RADIUS2=127.0.0.1 HS_RADSECRET=radiussecret

  1. please provide here the address for your router too.
  2. From the example above it has the address 192.168.0.1 (comma separated)

HS_UAMALLOW=10.1.0.0/24,192.168.0.1

  1. Put entire domains in the walled-garden with DNS inspection
  2. HS_UAMDOMAINS=".paypal.com,.paypalobjects.com"
  1. Optional initial redirect and RADIUS settings
  2. HS_SSID=<ssid> # To send to the captive portal
  3. HS_NASMAC=<mac address> # To explicitly set Called-Station-Id
  4. HS_NASIP=<ip address> # To explicitly set NAS-IP-Address
  1. The server to be used in combination with HS_UAMFORMAT to
  2. create the final chilli 'uamserver' url configuration.

HS_UAMSERVER=10.1.0.1

  1. Use HS_UAMFORMAT to define the actual captive portal url.
  2. Shell variable replacement takes place when evaluated, so here
  3. HS_UAMSERVER is escaped and later replaced by the pre-defined
  4. HS_UAMSERVER to form the actual "--uamserver" option in chilli.

HS_UAMFORMAT=https://\$HS_UAMSERVER/uam/

  1. Same principal goes for HS_UAMHOMEPAGE.

HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html

  1. This option will be configured to be the WISPr LoginURL as well
  2. as provide "uamService" to the ChilliController. The UAM Service is
  3. described in: http://coova.org/wiki/index.php/CoovaChilli/UAMService

HS_UAMSERVICE=https://10.1.0.1/cgi-bin/hotspotlogin.cgi


Pranala Menarik