Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 04/01/2013, à 16:12

ramaC

Coovachilli : problème de redirection

Bonjour!
Je travaille sur un projet de portail captif avec CoovaChilli,
mon système: Ubuntu server 10.04 LTS
j'ai suivi le tutoriel: http://doc.ubuntu-fr.org/coovachilli
j'ai un probleme de redirection; la page d'authnetificaion ne s'affiche pas, et je sais pas comment resoudre,

voici mon /etc/chilli/config:

# -*- mode: shell-script; -*-
#
#   Coova-Chilli Default Configurations.
#   To customize, copy this file to /etc/chilli/config
#   and edit to your liking. This is included in shell scripts
#   that configure chilli and related programs before file 'config'.


###
#   Local Network Configurations
#

# HS_WANIF=eth0            # WAN Interface toward the Internet
HS_LANIF=eth1              # Subscriber Interface for client devices
HS_NETWORK=192.168.10.0    # HotSpot Network (must include HS_UAMLISTEN)
HS_NETMASK=255.255.255.0   # HotSpot Network Netmask
HS_UAMLISTEN=192.168.10.1          # HotSpot IP Address (on subscriber network)
HS_UAMPORT=3990            # HotSpot UAM Port (on subscriber network)
HS_UAMUIPORT=4990          # HotSpot UAM "UI" Port (on subscriber network, for embedded portal)

# HS_DYNIP=
# HS_DYNIP_MASK=255.255.255.0
# HS_STATIP=
# HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=

# OpenDNS Servers

HS_DNS1=192.168.1.1
HS_DNS2=8.8.8.8

###
#   HotSpot settings for simple Captive Portal
#
HS_NASID=nas01
HS_RADIUS=127.0.0.1
HS_RADIUS2=127.0.0.1
HS_UAMALLOW=www.coova.org,www.google.com,192.168.10.0/24,192.168.1.1,8.8.8.8
HS_RADSECRET=ncri    # Set to be your RADIUS shared secret
HS_RADSECRET=ncri    # Set to be your RADIUS shared secret
HS_UAMSECRET=ncri     # Set to be your UAM secret
HS_UAMALIASNAME=chilli

#  Configure RADIUS proxy support (for 802.1x + captive portal support)
# HS_RADPROXY=on
# HS_RADPROXY_LISTEN=127.0.0.1
# HS_RADPROXY_CLIENT=127.0.0.1
# HS_RADPROXY_PORT=1645
# HS_RADPROXY_SECRET=$HS_RADSECRET
#  Example OpenWrt /etc/config/wireless entry for hostapd
#    option encryption wpa2
#    option server $HS_RADPROXY_LISTEN
#    option port $HS_RADPROXY_PORT
#    option key $HS_RADPROXY_SECRET


#   To alternatively use a HTTP URL for AAA instead of RADIUS:
# HS_UAMAAAURL=http://my-site/script.php

#   Put entire domains in the walled-garden with DNS inspection

#   The server to be used in combination with HS_UAMFORMAT to
#   create the final chilli 'uamserver' url configuration.

HS_UAMSERVER=$HS_NETWORK

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

HS_UAMFORMAT=https://\$HS_UAMSERVER/uam/index.html

#   Same principal goes for HS_UAMHOMEPAGE.

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

#   This option will be configured to be the WISPr LoginURL as well
#   as provide "uamService" to the ChilliController. The UAM Service is
#   described in: http://www.coova.org/CoovaChilli/UAMService
#

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

###
#   Firewall issues
#
# Uncomment the following to add ports to the allowed local ports list
# The up.sh script will allow these local ports to be used, while the default
# is to block all unwanted traffic to the tun/tap.
#
#HS_TCP_PORTS="80 443"

###
#   Standard configurations
#
HS_MODE=hotspot
HS_TYPE=chillispot
# HS_RADAUTH=1812
# HS_RADACCT=1813


HS_ADMUSR=chillispot
HS_ADMPWD=chillispot


###
#   Post-Auth proxy settings
#
# HS_POSTAUTH_PROXY=<host or ip>
# HS_POSTAUTH_PROXYPORT=<port>

#   Directory specifying where internal web pages can be served
#   by chilli with url /www/<file name>. Only extentions like .html
#   .jpg, .gif, .png, .js are allowed. See below for using .chi as a
#   CGI extension.
HS_WWWDIR=/etc/chilli/www
#   Using this option assumes 'haserl' is installed per-default
#   but, and CGI type program can ran from wwwsh to process requests
#   to chilli with url /www/filename.chi
HS_WWWBIN=/etc/chilli/wwwsh

#   Some configurations used in certain user interfaces
#
HS_PROVIDER=Coova
HS_PROVIDER_LINK=http://www.coova.org/


###
#   WISPr RADIUS Attribute support
#

HS_LOC_NAME="My HotSpot"           # WISPr Location Name and used in portal

#   WISPr settings (to form a proper WISPr-Location-Id)
# HS_LOC_NETWORK="My Network"      # Network name
# HS_LOC_AC=408                    # Phone area code
# HS_LOC_CC=1                      # Phone country code
# HS_LOC_ISOCC=BF                  # ISO Country code

et /etc/init.d/chilli:

#! /bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/chilli
NAME=chilli
DESC=chilli

START_CHILLI=0

if [ -f /etc/default/chilli ] ; then
   . /etc/default/chilli
fi

if [ "$START_CHILLI" != "1" ] ; then
   echo "Chilli default off. Look at /etc/default/chilli"
   exit 0
fi

test -f $DAEMON || exit 0
. /etc/chilli/functions

MULTI=$(ls /etc/chilli/*/chilli.conf 2>/dev/null)
[ -z "$DHCPIF" ] && [ -n "$MULTI" ] && {
    for c in $MULTI; 
    do
        echo "Found configuration $c"
        DHCPIF=$(basename $(echo $c|sed 's#/chilli.conf##'))
        export DHCPIF

export DHCPIF
        echo "Running DHCPIF=$DHCPIF $0 $*"
        sh $0 $*
    done
    exit
}

if [ -n "$DHCPIF" ]; then
    CONFIG=/etc/chilli/$DHCPIF/chilli.conf
else
    CONFIG=/etc/chilli.conf
fi

[ -f $CONFIG ] || {
    echo "$CONFIG Not found"
    exit 0
}

check_required

RETVAL=0


prog="chilli"

case "$1" in
  start)
        echo -n "Starting $DESC: "
        /sbin/modprobe tun >/dev/null 2>&1
        echo 1 > /proc/sys/net/ipv4/ip_forward

        writeconfig
        radiusconfig
 test ${HS_ADMINTERVAL:-0} -gt 0 && {    
            (crontab -l 2>&- | grep -v $0
                echo "*/$HS_ADMINTERVAL * * * * $0 radconfig"
                ) | crontab - 2>&-
        }

        ifconfig $HS_LANIF 0.0.0.0

        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.$HS_LANIF.pid \

           --exec $DAEMON -- -c $CONFIG
        RETVAL=$?
        echo "$NAME."
        ;;
    
    checkrunning)
        check=`start-stop-daemon --start --exec $DAEMON --test`
        if [ x"$check" != x"$DAEMON already running." ] ; then
            $0 start
        fi
;;
    
    radconfig)
        [ -e $MAIN_CONF ] || writeconfig
        radiusconfig
        ;;
    
    restart)
        $0 stop
        sleep 1
 $0 start
        RETVAL=$?
        ;;
    
    stop)
        echo -n "Stopping $DESC: "

        crontab -l 2>&- | grep -v $0 | crontab -


 start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.$HS_LANIF.p$
            --exec $DAEMON
        echo "$NAME."
        ;;
    
    reload)
        echo "Reloading $DESC."
        start-stop-daemon --stop --signal 1 --quiet --pidfile \
            /var/run/$NAME.$HS_LANIF.pid --exec $DAEMON
        ;;
  condrestart)
        check=`start-stop-daemon --start --exec $DAEMON --test`
        if [ x"$check" != x"$DAEMON already running." ] ; then
            $0 restart
            RETVAL=$?
        fi
        ;;
    
    status)
 status chilli
        RETVAL=$?
        ;;
    
    *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|condrestart|status|reload|radconfig}" >&2
        exit 1
        ;;
esac
exit 0


svp si vous pouvez m'aider, c'est vraiment urgent,
merci d'avance

Hors ligne

#2 Le 08/01/2013, à 12:07

ramaC

Re : Coovachilli : problème de redirection

personne pour m'aider????:(

Hors ligne

#3 Le 04/02/2013, à 15:01

dwarf72

Re : Coovachilli : problème de redirection

Bonjour ramaC,

Je constate que dans ton /etc/init.d/chilli, tu as

START_CHILLI=0

Si tu n'as pas encore essayé, change le paramètre en :

START_CHILLI=1

En espérant que ça puisse t'aider.

Hors ligne