Saturday, March 17, 2012

INSTALL HOTSPOT YFI (part 2)

Note :
Source of the original article : 
http://sourceforge.net/apps/trac/hotcakes/wiki/yfi_setup_cake
I have edited some parts according to my experience
This post continued from previous post

Configuring FreeRADIUS
  • Before you compile the souce code of FreeRADIUS, ensure the following packages are installed:
sudo apt-get install build-essential libmysqlclient15-dev libperl-dev \
libxml-simple-perl libmail-sendmail-perl libssl-dev
  • Download FreeRADIUS source code. (http://freeradius.org/download.html )
wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.1.12.tar.gz
tar -xzvf freeradius-server-2.1.12.tar.gz
cd freeradius-server-2.1.12
./configure | tee config_out.txt
make
sudo make install
sudo ldconfig
  • Test to see if Free Radius works by issuing the following command:
sudo /usr/local/sbin/radiusd -X
  • This will start Free Radius in debug mode ( To stop it -> Ctrl+c). 
  • FreeRADIUS has a startup script. The following will ensure automatic startup between reboots.
sudo cp /usr/local/sbin/rc.radiusd /etc/init.d/radiusd
sudo update-rc.d radiusd start 80 2 3 4 5 . stop 20 0 1 6 .

Setup FreeRADIUS

  • The following commands will set-up FreeRADIUS to work together with YFi Hotspot Manager.
sudo mv /usr/local/etc/raddb /usr/local/etc/raddb.orig
sudo cp /var/www/c2/yfi_cake/setup/radius/raddb.tar.gz /usr/local/etc/
cd /usr/local/etc/
sudo tar -xzvf raddb.tar.gz
sudo chown root.www-data /usr/local/etc/raddb/proxy.conf
sudo chmod 664 /usr/local/etc/raddb/proxy.conf
sudo chmod 644 /usr/local/etc/raddb/dictionary
sudo ldconfig

Activate and change chillispot dictionary

  • FreeRADIUS includes various dictionaries from different vendors. These dictionaries defines attributes for the vendor's NAS devices. 
  • Dictionaries can be included or excluded by editing the /usr/local/share/freeradius/dictionary file. The latest version of FreeRADIUS all ready includes the chillispot dictionary by default. 
  • YFi Hotspot Manager defines special Voucher attributes. To enable these, add the following to the /usr/local/share/freeradius/dictionary.chillispot file. (Yfi Attributes and Yfi Counters)
ATTRIBUTE       ChilliSpot-Version                      8       string
ATTRIBUTE       ChilliSpot-OriginalURL                  9       string
#YFi Specific Attributes
ATTRIBUTE       Yfi-Voucher                            40     string
ATTRIBUTE       Yfi-MAC-Reset                          41     string
ATTRIBUTE           Yfi-Data                           42     string
ATTRIBUTE           Yfi-Time                          43     string
#YFi Various Counters
ATTRIBUTE       Max-Daily-Session               50      integer
ATTRIBUTE       Max-Monthly-Session             51      integer
ATTRIBUTE       Max-Weekly-Session              52      integer
ATTRIBUTE       Max-All-Session                 53      integer
ATTRIBUTE       ChilliSpot-Max-Daily-Octets               60      integer
ATTRIBUTE       ChilliSpot-Max-Monthly-Octets             61      integer
ATTRIBUTE       ChilliSpot-Max-Weekly-Octets              62      integer
ATTRIBUTE       ChilliSpot-Max-All-Octets                 63      integer
# Configuration management parameters (ChilliSpot Only)
ATTRIBUTE       ChilliSpot-UAM-Allowed                  100     string

Remove virtual.example.com

Edit /usr/local/etc/raddb/proxy.conf Change this part:
# Sample virtual home server.
home_server virtual.example.com {
    virtual_server = virtual.example.com
}
To:
# Sample virtual home server.
#home_server virtual.example.com {
#    virtual_server = virtual.example.com
#}

Additional changes

  • If you deviated from the standard, the following files may need changes
  • /usr/local/etc/raddb/sql.conf - This defines the database conecction detail.
  • /usr/local/etc/raddb/rlm_perl_modules/conf/settings.conf - This defines the database settings and counters used by the FreeRADIUS YFi Hotspot Manager Perl module.

Final testing

  • As a final test issue the following command and ensure no errors are present.
sudo /usr/local/sbin/radiusd -X
  • If there are no errors start the FreeRADIUS service through the startup script
sudo /etc/init.d/radiusd start

Install CoovaChilli

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

dpkg -i coova-chilli_1.0.14-1_i386.deb    
  • Now look either the /etc/chilli/defaults. Copy this file to config (in the same directory).
cp /etc/chilli/defaults /etc/chilli/config
  • edit file config.
# 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)
#   HotSpot settings for simple Captive Portal
HS_NASID=nas01
HS_UAMSECRET=greatsecret
HS_RADIUS=127.0.0.1
HS_RADIUS2=127.0.0.1
HS_RADSECRET=testing123
HS_UAMALLOW=coova.org
HS_NASIP=10.1.0.1   # To explicitly set NAS-IP-Address
HS_UAMFORMAT=http://10.1.0.1/coova_json/hs_land.php
HS_UAMHOMEPAGE=http://10.1.0.1/coova_json/splash.php
HS_UAMSERVICE=https://coova.org/app/uam/auth
HS_MODE=hotspot
HS_TYPE=chillispot
HS_WWWDIR=/etc/chilli/www
HS_WWWBIN=/etc/chilli/wwwsh
HS_PROVIDER=Coova
HS_PROVIDER_LINK=http://www.coova.org/
HS_LOC_NAME="My HotSpot"           # WISPr Location Name and used in portal
  • Edit file ” /etc/default/chilli ” change value = 1
START_CHILLI=1
CONFFILE="/usr/local/etc/chilli.conf"
  • add the following line to the end of file /etc/chilli/up.sh
 # may not have been populated the first time; run again
    [ -e "/var/run/chilli.iptables" ] && sh /var/run/chilli.iptables 2>/dev/null
    # force-add the final rule necessary to fix routing tables
    iptables -I POSTROUTING -t nat -o $HS_WANIF -j MASQUERADE
  • it’s time to try start chilli
/etc/init.d/chilli start

User Login Page

  • copy folder coova_json to directory "/var/www"
cp -R /var/www/c2/yfi_cake/setup/coova_json /var/www
  • check in the file /var/www/coova_json/uam.php, make sure $uamsecret=greatsecret. and in the file  var/www/coova_json/login.php, change value $port=3990.
  • Until this step, your server hotspot  are ready to use. Restart the computer, try to make connection with the laptop user. while browsing, if it appears yfi hotspot login page, it means the server hotspot yfi successfully work. Make sure, to input the correct  username  and password in the login page user, if all goes normally, the login page will automatically redirect to the destination site.

Install pptpd

  • This is optional, but I recommend because there are some part can missing if you not install this. In source article said WARNING: DO NOT SKIP THIS STEP - EVEN IF YOU DO NOT INTEND TO USE pptp!!!!!

Setup Instructions

  • Install the pptpd service
sudo apt-get install pptpd
  • Edit the config file of the server ( sudo vi /etc/pptpd.conf) and change the bottom part:
# (Recommended)
localip 10.20.30.1
#remoteip 10.20.30.2-10.20.30.254
#localip 192.168.0.1
#remoteip 192.168.0.234-238,192.168.0.245
# or
#localip 192.168.0.234-238,192.168.0.245
#remoteip 192.168.1.234-238,192.168.1.245
  • This will cause the server to create a virtual interface with IP 10.20.30.1. 
  • Poin to point virtual connections can be set-up from the NAS devices, using this IP when you specify the RADIUS server's IP. 
  • Make the file where the clients to the pptpd program gets defiend writable by the user running Apache.
sudo chown root.www-data /etc/ppp/chap-secrets
sudo chmod 664 /etc/ppp/chap-secrets
  • Restart the pptpd program to apply the changes
sudo /etc/init.d/pptpd restart


Cron Scripts

  • YFi Hotspot Manager require a few scripts to run periodically in order to maintain a healthy and working system. 
  • This section will discuss each of the Cron scripts involved and how to configure the server to run them via the Cron system. 
  • Most of the scripts are CakePHP shell scripts. This makes it easy to interact with the MySQL database used by FreeRADIUS.
  • To activate the cron scripts execute the following command, which will add YFi Hotspot Manager's crons scripts to the Cron system
sudo cp /var/www/c2/yfi_cake/setup/cron/yfi /etc/cron.d/
  • If you want to change the default intervals at which the scripts gets executed, just edit the /etc/cron.d/yfi file.

Location of cron scripts

  • It may happen that the CakePHP application (yfi_cake) is not installed in the default place as per this instructions. Should this be the case please update the /etc/cron.d/yfi file accordingly to reflect the correct paths. 
    If you fail to comply to this, you will end up with a mis-configured, ill behaving YFi Hotspot Manager.

Congratulations! Your YFi Hotspot Manager setup is complete.

101 comments:

  1. hello . Good work done. Can you have it pre installed on ubuntu 12 as iso file to make this easier .

    Thankx

    ReplyDelete
    Replies
    1. Also, Easyhotspot is not currently mantained nor updated. A real pity.

      Delete
  2. Can you install a captive portal afterwards?

    ReplyDelete
  3. I'm following your steps, one by one, but I think there's somethin I've missed...

    "Install CoovaChilli
    wget http://ap.coova.org/chilli/coova-chilli_1.0.14-1_i386.deb
    Now look either the /etc/chilli/defaults. Copy this file to config (in the same directory).
    cp /etc/chilli/defaults /etc/chilli/config"

    Once I have the .DEB file downloaded, I suppose I have to install it. Maybe something like this:

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

    Am I right?

    ReplyDelete
  4. Hello! I'm still setting up the hotspot, and I've found another hurdle... When I enter the following command:

    /etc/init.d/chilli start

    I get a few errors:

    Starting chilli: /etc/init.d/chilli: 120: cannot create /proc/sys/net/ipv4/ip_forward: Permission denied
    updating /etc/chilli/main.conf
    cp: no se puede crear el fichero regular «/etc/chilli/main.conf»: Permiso denegado
    updating /etc/chilli/hs.conf
    cp: no se puede crear el fichero regular «/etc/chilli/hs.conf»: Permiso denegado
    touch: no se puede efectuar `touch' sobre «/etc/chilli/local.conf»: Permiso denegado
    touch: no se puede efectuar `touch' sobre «/etc/chilli/hs.conf»: Permiso denegado
    updating /etc/chilli/hs.conf
    cp: no se puede crear el fichero regular «/etc/chilli/hs.conf»: Permiso denegado
    reconfiguring chilli
    Colgar (hangup)

    I've tried to start Chilli again, this time using sudo just before, and it seemed to work:

    Starting chilli: updating /etc/chilli/main.conf
    updating /etc/chilli/hs.conf
    chilli.

    Is it a correct way of starting it? Or will it backfire later?

    ReplyDelete
  5. Also... When I edit the file /var/www/coova_json/uam.php, I found that the variable $uamsecret is just like this:

    $uamsecret=greatsecret

    And you state that it should be like this:

    $uamsecret='greatsecret'

    Do the apostrophes really matter?

    ReplyDelete
  6. Well... I have finished the setup, and it is not working. :( I'm testing this kind of setup:

    ROUTER --- YFI Hotspot --- Switch --- Laptop

    From the YFI Hotspot server I can access the internet with no problem. ETH0 connects to the internet, and ETH1 just to the Swich, where a Laptop with DHCP is connected too.

    I do get a correct IP on the laptop (10.1.0.3), but I'm not sure about the mask (255.255.255.0). The default gateway is 10.1.0.1, which seems ok, and I also have correct DNS servers on the laptop, assigned by the server (8.8.8.8 and 8.8.4.4).

    Whenever I try to browse to a random webpage from the laptop, it states that the server could not be found. There is no captive portal showing up.

    If I try to "force" the login to the captive portal splash page, on 10.1.0.1 the following page shows up:

    "It works! This is the default web page for this server. The web server software is running but no content has been added, yet."

    If I enter the browser "10.1.0.1/yfi", the Yfi Hotspot Manager page shows up. From there, I can enter and manage the Yfi Hotspot Server, with no problem at all.

    If I try to "force" the login page showing up, pointing the browser to "10.1.0.1/coova_json/hs_land.php", the login page loads ok. But if I try to enter a login/password, the textboxes clear up, and nothing happens. It just modifies the address, adding a lot of parameters, but doesn't allow browsing at all.

    Please, help. I'm beginning to desperate...

    ReplyDelete
  7. Ok, I did as you suggest, entered the IP of Yahoo on the laptop's browser, and it worked as you expected. You nailed it. I was redirected to the login page of the captive portal. But even when I enter a valid username and password, nothing happens.

    You say that I have to fix the iptables. Well, I'm just a newbie with command-line editing of iptables, so... Which file do I have to fix? In which way? I fear that if I mess with it, it would be worse... Any help?

    ReplyDelete
    Replies
    1. Hello again. I don't know why, but if I stop and start the chillispot service, the captive portal does indeed work. I try to browse from a laptop to any webpage, chilli captures it and forces the browser to the login page. But I have tried to login with a few voucher users I did create, to no avail. Even when using the default user dvdwalt@ri I could not enter. The captive portal just blinked, erased the login & password textboxes, and asks for login & password again. Could it be a radius related issue?

      Delete
    2. Right now, in the file uam.php, the password is set right this way:

      $uamsecret = greatsecret;

      and the port, on login.php, that way:

      $port = 3990;

      I suppose that it is ok, I mean, no ' nor " separating values or whatever.

      Delete
    3. Great, Nadia! I checked both files, and it was just a matter of adding apostrophes in both, or in none, of the configuration files you pointed me to. Right now it is working, I still have to test vouchers, and some other things, but it looks promising... Thank you very much.

      Delete
    4. Well, I've been fiddling around for a while with my setup, and it works... mostly. I mean, the basics, creating vouchers, restricting users when data caps are depleted, that sort of things work flawlessly.

      But there are a few things that do not work. None of the Activity/stats tab work, I can't see who is connected, neither can I monitor their activity. I have used both a handful of vouchers and two or three permanent users, and I'm completely blind about their activity.

      Also, whenever someone logs in or out, I can't see that really cool popup stating "someone has joined" or "someone has left".

      I don't know where can I check what to enable that. Any idea?

      Delete
    5. hello I have all configured well I guess. the problem I have is that when income is connected and there is no more disconnects, apart do not know if it is normal but my nas are down. Can you help me please

      Delete
    6. you miss to install pptpd. make sure you have it.

      Delete
  8. and everything is installed, I can connect with any device but not surfing the internet, I was thinking that perhaps they could be the configuration of coovachilli but check and did not find problems there

    ReplyDelete
    Replies
    1. check your connection to internet, with command "ping".... from router or from user... for example...
      ping 8.8.8.8 --->> if not ok... check your firewall and routing...
      ping www.google.com --->> if not ok... check your dns...

      Delete
    2. ok. I'll try and see what happens. thanks
      I notice how it goes
      again thank you very much for your answer

      Delete
  9. Hi

    Hoping someone can help me please, i have gotten as far as installing coovachilli. However when i run the the command to start chilli i get the following error : starting chilli: /usr/sbin/chilli: error while loading shared libraries: libssl.so.1.0.0: no such file or directory. Im stuck .

    ReplyDelete
    Replies
    1. sudo apt-get update
      sudo apt-get install libssl1.0.0 libssl-dev
      hope it will fix it... good luck..

      Delete
  10. hii
    can help me please..
    how can to configure radius server so as to syncron access point with security wpa enterprise

    reply quickly please
    Thanks..

    ReplyDelete
  11. Hi Roel,
    Is their anyway to customize this login page? I want to use my own PHP written login page. Thanks!

    ReplyDelete
  12. Hi Roel,

    How it works accounting?

    Thanks

    ReplyDelete
  13. hello,
    I'm following your steps, one by one, but my client can not get the IP address.. seem like DHCP not working well,
    then is there any interface tunnel created by interface LAN ?

    ReplyDelete
  14. i cant download wget http://ap.coova.org/chilli/coova-chilli_1.0.14-1_i386.deb or http://coova-chilli.s3.amazonaws.com/coova-chilli-1.3.0.tar.gz

    you know any alternative?

    ReplyDelete
  15. try this... https://github.com/coova/coova-chilli

    ReplyDelete
    Replies
    1. I downloaded coova-chilli-master.zip
      how can i install it?

      Delete
    2. search and read "readme" file..

      Delete
    3. Im using centos 6.6 in "Makefile.am" has this line:
      SUBDIRS += src doc www conf debian distro

      When I do:
      $ ./configure --prefix=/coova-chilli
      At the end shows me: "config.status: error: cannot find input file: Makefile.in"

      $ make
      make: *** No targets specified and no makefile found. Stop.

      Could you help me? thank you.

      Delete
    4. yum install wget mc vim unzip zip gcc gcc-c++ make git svn nano tar dnsmasq patch automake libtool gengetopt

      then go to coovachilli.
      sh bootstrap
      ./configure; make

      Delete
    5. the terminal show me this at the end:
      "/bin/sh: gengetopt: command not found
      make[3]: *** [cmdline.c] Error 127
      make[3]: Leaving directory `/home/richard/coova-chilli/src'
      make[2]: *** [all-recursive] Error 1
      make[2]: Leaving directory `/home/richard/coova-chilli/src'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/richard/coova-chilli'
      make: *** [all] Error 2"

      I installed gengetopt manually and show me this at the end:
      "mv chilli.conf.tmp chilli.conf
      make[2]: Leaving directory `/home/richard/coova-chilli/conf'
      Making all in debian
      make[2]: Entering directory `/home/richard/coova-chilli/debian'
      make[2]: Nothing to be done for `all'.
      make[2]: Leaving directory `/home/richard/coova-chilli/debian'
      Making all in distro
      make[2]: Entering directory `/home/richard/coova-chilli/distro'
      make[2]: Nothing to be done for `all'.
      make[2]: Leaving directory `/home/richard/coova-chilli/distro'
      make[2]: Entering directory `/home/richard/coova-chilli'
      make[2]: Leaving directory `/home/richard/coova-chilli'
      make[1]: Leaving directory `/home/richard/coova-chilli' "

      Is properly installed Coova-chilli?

      Thank you very much.

      Delete
    6. This comment has been removed by a blog administrator.

      Delete
    7. I don't have this file: /etc/default/chilli
      How can I find to edit it?

      I can't start chilli with this:
      /etc/init.d/chilli start
      I use this: /usr/local/etc/init.d/chilli start
      Terminal show me:
      Starting chilli: which: no start-stop-daemon in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/richard/bin)

      Isn't running normally?

      Delete
    8. sh bootstrap
      ./configure;
      make;
      make install

      cp /usr/local/etc/init.d/chilli /etc/init.d/
      ln -s /usr/local/etc/chilli.conf /etc/chilli.conf
      ln -s /usr/local/etc/chilli /etc/chilli

      Delete
    9. After these, i tried to start chilli.
      And show me: start-stop-daemon: user 'chilli' not found

      Delete
    10. user chilli not found... that's the error... you know that...
      creat the user chilli...
      or...
      edit file /etc/init.d/chilli... find user "chilli" and delete it...
      look at this link... for your reference
      http://myconfigure.blogspot.com/2013/04/easyhotspot-in-centos-64-coovachilli-130.html

      Delete
    11. /usr/local/etc/init.d/chilli start
      Starting chilli:
      not show me OK.
      But I think it started correctly. Do you agree?

      I dont have /etc/default/chilli ”, Should i create ? To configure:
      START_CHILLI=1
      CONFFILE="/usr/local/etc/chilli.conf"

      Delete
  16. On the machine that i installed coova,
    i can ping to client:
    ping 10.1.0.3
    PING 10.1.0.3 (10.1.0.3) 56(84) bytes of data.
    64 bytes from 10.1.0.3: icmp_seq=1 ttl=64 time=2.14 ms
    64 bytes from 10.1.0.3: icmp_seq=2 ttl=64 time=1.38 ms

    but the client cant ping to machine coova server
    ping 10.1.0.2
    PING 10.1.0.2 (10.1.0.2) 56(84) bytes of data.
    From 10.1.0.3 icmp_seq=1 Destination Host Unreachable
    From 10.1.0.3 icmp_seq=2 Destination Host Unreachable

    and can ping to IP hotspot server:

    ping 10.1.0.1
    PING 10.1.0.1 (10.1.0.1) 56(84) bytes of data.
    64 bytes from 10.1.0.1: icmp_seq=1 ttl=64 time=1.58 ms
    64 bytes from 10.1.0.1: icmp_seq=2 ttl=64 time=1.62 ms

    I cant acess captive portal on the client.

    ReplyDelete
    Replies
    1. in your browser client, http://114.121.194.117/ --->> what's happen ?
      redirect to login hotspot or not ?
      if not check your firewall.iptables again...

      Delete
    2. When i acess http://114.121.194.117/ on browser client.
      Show me this:

      "CakePHP: the rapid development php framework
      Missing Controller

      Error: LoginPagesController could not be found.

      Error: Create the class LoginPagesController below in file: yfi_cake/controllers/login_pages_controller.php



      Notice: If you want to customize this error message, create yfi_cake/views/errors/missing_controller.ctp"

      Delete
    3. I thick redirect to login, the url is: http://10.1.0.1/c2/yfi_cake/login_pages/browser_detect?res=notyet&uamip=10.1.0.1&uamport=3990&challenge= ....

      How I can solve this problem?

      Delete
    4. And when i acess http://127.0.0.1/c2/, show me this on browser:

      "Warning (512): /var/www/cakephp-1.2.11/app/tmp/cache/ is not writable [CORE/cake/libs/cache/file.php, line 272]
      CakePHP: the rapid development php framework
      Release Notes for CakePHP 1.2.11.
      Read the changelog

      Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE/cake/libs/debugger.php, line 548]

      Code

      function checkSessionKey() {
      if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
      trigger_error(__('Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application', true), E_USER_NOTICE);

      Debugger::checkSessionKey() - CORE/cake/libs/debugger.php, line 548
      include - CORE/cake/libs/view/pages/home.ctp, line 31
      View::_render() - CORE/cake/libs/view/view.php, line 665
      View::render() - CORE/cake/libs/view/view.php, line 375
      Controller::render() - CORE/cake/libs/controller/controller.php, line 808
      PagesController::display() - CORE/cake/libs/controller/pages_controller.php, line 81
      Object::dispatchMethod() - CORE/cake/libs/object.php, line 117
      Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 226
      Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 193
      [main] - APP/webroot/index.php, line 87

      Your tmp directory is NOT writable.

      The FileEngine is being used for caching. To change the config edit APP/config/core.php
      Your database configuration file is NOT present.
      Rename config/database.php.default to config/database.ph

      Delete
    5. have you read this link... ?
      http://myconfigure.blogspot.com/2013/07/yfi-hotspot-manager-on-fedora-18-19-and.html
      http://myconfigure.blogspot.com/2013/07/how-to-fix-problems-in-installing-yfi_2.html

      Delete
    6. I tried this:

      chown -R www-data. /var/www/c2/yfi_cake/tmp
      chown -R www-data. /var/www/c2/yfi_cake/webroot/img/graphics

      but didn't solve.

      i also tried disable firewall using: ufw disable.

      Any sugestion?

      Delete
    7. Should i install system-config-firewall on ubuntu? To solve this problem...

      Delete
  17. I allow ssh,http,http on ufw.
    I created login_pages_controller.php
    with this code :
    "

    "

    And then, when i acess ttp://10.1.0.1/c2/yfi_cake/login_pages/browser_detect?res=notyet&uamip=10.1.0.1&uamport=3990&....

    show me:"Error: Database table login_pages for model LoginPage was not found."

    ReplyDelete
    Replies
    1. http://myconfigure.blogspot.com/2013/07/how-to-fix-problems-in-installing-yfi_2.html

      Delete
    2. I did this points: "04. Error. Missing database table" and "13. Error. cakephp-1.2.12/yfi_cake/tmp cache/ is not writable"
      but didnt solve.

      i dont know what to do.

      Delete
    3. check your php version and yfi cake version...
      please read the link till the last word...
      http://myconfigure.blogspot.com/2013/07/how-to-fix-problems-in-installing-yfi_2.html

      Delete
  18. When i did: /usr/local/etc/init.d/chilli start
    Starting chilli: which: no start-stop-daemon in.

    I modify chilli.conf user=chilli to root but didnt solve.
    I also did ./configure; make make install again and didnt solve.

    Any sugestion?

    ReplyDelete
    Replies
    1. to install coova i use this commands:
      wget http://ap.coova.org/chilli/coova-chilli-1.3.0.tar.gz
      tar -xzvf coova-chilli-1.3.0.tar.gz
      ./configure;
      make
      make install

      Delete
    2. edit file /usr/local/etc/init.d/chilli... find user "chilli" and delete it.

      Delete
    3. "start-stop-daemon -K --pidfile=$pidfile --user=chilli \"
      Should i have remove "--user=chilli" or only "chilli"?

      Delete
    4. you should try it yourself, dont be afraid... if it fail, you can rollback or try another options...good luck...

      Delete
    5. I think, it show that message but is running.
      Because of: tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
      Do you agree?

      When i use client browser to acess ip server, show me this:
      http://10.1.0.1/coova_json/splash.php?loginurl=http%....

      Not Found
      The request URL /coova_json/splash.php was not found on this server

      Delete
    6. What should i have to do?

      Thank you for help me, really.

      Delete
    7. what version OS that you're using... ?
      what version php and yfi_cake that you're using... ?
      did you do point "login page" above ?
      service http must running..., service apache2 restart...

      Delete
    8. CentOs6.6
      Php 5.3.3(cli)
      yfi_cake-Beta-5.tar.gz
      yfi-Beta-5.tar.gz

      I can acess correctly: http:///c2/yfi_cake/users/ and http:///yfi.


      cp -R /var/www/c2/yfi_cake/setup/coova_json /var/www
      I check /var/www/coova_json/uam.php,$uamsecret=greatsecret. var/www/coova_json/login.php, I change value 3660 to $port=3990.

      httpd status:
      httpd (pid 1423) is running...

      I did:
      service httpd restart
      Stopping httpd: [ OK ]
      Starting httpd: [ OK ]

      On browser client when i acess any website dont redirect me to http://10.1.0.1/coova_json/splash.php?loginurl=http...
      but if i acess 10.1.0.1:3990 it redirect.

      But continue show me: The requested URL /coova_json/splash.php was not found on this server.

      Delete
    9. Ok.... centos... its mean you follow my post http://myconfigure.blogspot.com/2013/07/yfi-hotspot-manager-on-fedora-18-19-and.html ... is it right... ?
      hotspot manager, http://(your-ip-address)/yfi/... you can access... good...
      this is the correct...
      cp -R /var/www/c2/yfi_cake/setup/coova_json /var/www/html <---- not /var/www

      from browser client, try access http://173.194.117.101 <---youtube...

      good luck

      Delete
    10. Now i can acess captive portal. Thank you very much! You really help me!

      http://173.194.117.101- its google

      Delete
  19. in the /var/www/html folder I have: c2 cakephp-1.2.12 and yfi folder.
    coova_json folder is /wvar/www/coova_json

    I think I can only access the folders on html in the browser server.
    Im desesperating.

    ReplyDelete
  20. Have you any MSC between server and client?

    ReplyDelete
    Replies
    1. Could you help with MSC?

      Delete
    2. what is MSC ? I dont know what you mean...

      Delete
    3. message sequence chart. Could you help to make that?

      Delete
    4. sorry, there's no msc ?
      but, maybe you interest about this link, http://myconfigure.blogspot.com/2013/04/how-does-hotspot-billing-system-work.html
      and after you read it, maybe you will able to make msc by yourself.

      Delete
    5. Thank you very much.
      I will read.

      Delete
  21. After my client login it cant logout.
    How I can do that?

    I think it's like this page: http://3.bp.blogspot.com/-q6PJdiCpYkM/Ubda1V98QhI/AAAAAAAAAMY/W-q9ESwIzok/s400/login+from+users.png

    ReplyDelete
    Replies
    1. After making authentication and access a website.
      If you return to address 10.1.0.1 it asks authentication again.
      The session was already active.

      Delete
    2. if no actifity to internet, the client automatically logout...
      when you create voucher... there's options how long no activity...
      try to setting the options till you find the best for your client...

      Delete
  22. How I can configure chilli to start when centos startup?

    ReplyDelete
  23. Hi,
    on ubuntu, php5.5 i should use svn.

    Can you explain me the changes?

    After
    cd /var/www
    should i have to create dir c2?
    mkdir c2 , then
    sudo ln -s ./cake_1.2.11 ./c2

    ReplyDelete
    Replies
    1. look at here how to use svn
      http://myconfigure.blogspot.com/2013/07/yfi-hotspot-manager-on-fedora-18-19-and.html

      Delete
    2. When I acess:
      http://127.0.0.1/c2/yfi_cake/users/login
      Not Found
      The requested URL /c2/yfi_cake/users/login was not found on this server.
      Apache/2.4.7 (Ubuntu) Server at 127.0.0.1 Port 80

      And when i acess 127.0.0.1/yfi
      I have YFi Hotspot Manager but without login.

      I did this http://myconfigure.blogspot.pt/2013/07/how-to-fix-problems-in-installing-yfi_2.html but didnt solved...

      Any sugestion?

      Delete
  24. Hi,
    when I acess client browser it redirect me to:http://10.1.0.1/coova_json/splash.php?loginurl=http%3b%2f%2f10.1.0.1%2fcoova_json%2fhs_land.php
    but doesnt show me the login page
    info i have this:
    login.php -> $port = $_POST['uamport'];
    hs_land.php ->$uamport = $_REQUEST['uamport'];

    ReplyDelete
    Replies
    1. I dont know if helps but when i run /etc/init.d/chilli stop
      $Shutting down chilli: No process in pidfile '/usr/local/var/run/chilli.pid' found running; none killed.

      Delete
    2. reconfigure, from beginning.... :)
      please read step by step, carefully.

      Delete
    3. I did first part correcty. I can acess yfi and /c2/yfi_cake/users/login.

      But second part, when redirect doenst show me the page login.

      Delete
    4. what os version that you're using... ?

      Delete
    5. I install with svn using : yfi-hotspot-manager-on-fedora-18-19-and.html.
      I tried cp -R /var/www/c2/yfi_cake/setup/coova_json /var/www or cp -R /var/www/c2/yfi_cake/setup/coova_json /var/www/html
      but didnt work

      login php : $server_ip = $_POST['uamip'];
      $port = $_POST['uamport'];
      hs_land:
      $uamip = $_REQUEST['uamip'];
      $uamport = $_REQUEST['uamport'];

      i changed $uamip='10.1.0.1'
      $uamport = '3990'
      And continue not working.
      It redirects to http://10.1.0.1/coova_json/splash.php?loginurl=http%3a%2f%2f10.1.0.1%2fcoova_json%2fhs_land.php%3f .... but doenst show login page


      Delete
    6. Im using Ubuntu 14.04 LTS

      Delete
    7. be sure your ip address client is 10.1.0.x /24 and gateway 10.1.0.1

      Delete
    8. On my client inet addr:10.1.0.3 Bcast:10.1.0.255 Mask:255.255.255.0
      i can ping 10.1.0.1

      Delete
    9. I reconfigure, i did step by step.
      I think its someting wrong maybe are about folders or versions....

      Any sugestion?

      Delete
  25. Hi again.
    I tried again, reinstall and reconfigure.

    I can acess on client http://10.1.0.1/yfi/ and http://10.1.0.1/c2/yfi_cake/users/login
    but i cant acess captive portal.
    I install php 5.3.29 on server and install yfi svn.
    I use apt-get install pptpd and it installs pptpd v1.3.4.

    I follow all the steps correcty on my ubuntu 14.04.

    Please help me...

    ReplyDelete
    Replies
    1. try to use yfi beta 5. not use yfi svn

      Delete
    2. i tried but didnt work. Now i have php 5.5 ( i did sudo apt-get install php5)

      Do you know any problem with php 5.5 with svn and ubuntu 14?

      Delete
  26. After I did dpkg -i coova-chilli_1.0.14-1_i386.deb
    how can i acess source code?

    ReplyDelete
  27. I installed it successfully.
    On the client is redirected to the page but does not appear the login page.

    What is the solution?

    http://10.1.0.1/coova_json/splash.php?loginurl=

    ReplyDelete
    Replies
    1. please read some comments above... that's the same question..

      Delete
    2. I did what you sugest: cp -R /var/www/c2/yfi_cake/setup/coova_json /var/www/html
      didnt work for me.

      On client if acess google.com-> http://10.1.0.1/coova_json/splash.php?loginu
      and browser: The connection has timed out

      The server at 10.1.0.1 is taking too long to respond.

      Delete
    3. http://myconfigure.blogspot.pt/2013/07/how-to-fix-problems-in-installing-yfi_2.html

      Delete
    4. I acess correctly 10.1.0.1/yfi and 10.1.0.1/c2/yfi_cake/users/
      I cant acess login captive portal page on client.

      Delete
    5. check your php version
      if 5.4 or latest use yfi_cake-svn + yfi-viewer-svn

      Delete
  28. I use php 5.4.16 and svn yfi and yfi cake.
    And not working.
    Im changed $port = $_POST['uamport']; to $port = '3990'; and continue not working.
    And I installed every part correcty.

    ReplyDelete
  29. Instead I install:
    wget http://ap.coova.org/chilli/coova-chilli_1.0.14-1_i386.deb
    dpkg -i coova-chilli_1.0.14-1_i386.deb
    if i install
    http://ap.coova.org/chilli/coova-chilli-1.3.0.tar.gz

    captive portal doesnt work but if i used .deb work.
    Its necessary for me use .tar.gz
    do you know why?

    ReplyDelete
  30. How I can configure HTTPS redirect?

    ReplyDelete