วันพฤหัสบดีที่ 28 กุมภาพันธ์ พ.ศ. 2556

Smile Authen 192.168.0.1

ผมพึ่งลง ClearOS + Smile Authen ครั้งแรกครับ 

ตอนแรกที่ลง Chilli แจก IP 10.0.1.xx ผมต้องการให้ Chilli แจก IP 192.168.0.xx 
จึงเข้าไปแก้ไฟล์ /etc/chilli/config เป็นตามนี้ครับ

# -*- /bin/sh -*-
#
# 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.0.0 # HotSpot Network (must include HS_UAMLISTEN)
HS_NETMASK=255.255.255.0 # HotSpot Network Netmask
HS_UAMLISTEN=192.168.0.1 # HotSpot IP Address (on subscriber network)
HS_UAMPORT=3990 # HotSpot Port (on subscriber network)

# HS_DYNIP=
# HS_DYNIP_MASK=255.255.255.0
# HS_STATIP=
# HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=
HS_DNS1=61.19.22.155
# HS_DNS2=

###
# HotSpot settings for simple Captive Portal
#
HS_NASID=nas01
HS_UAMSECRET=ht2eb8ej6s4et3rg1ulp
HS_RADIUS=127.0.0.1
HS_RADIUS2=127.0.0.1
HS_RADSECRET=testing123
HS_UAMALLOW=192.168.0.0/24

# Put entire domains in the walled-garden with DNS inspection
# HS_UAMDOMAINS=".paypal.com,.paypalobjects.com"

# Optional initial redirect and RADIUS settings
# HS_SSID=<ssid> # To send to the captive portal
# HS_NASMAC=<mac address> # To explicitly set Called-Station-Id
# HS_NASIP=<ip address> # To explicitly set NAS-IP-Address

# The server to be used in combination with HS_UAMFORMAT to 
# create the final chilli &#39;uamserver&#39; url configuration.
HS_UAMSERVER=192.168.0.1

# 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=http://\$HS_UAMSERVER/sam/hotspotlogin.php

# Same principal goes for HS_UAMHOMEPAGE.
HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/prelogin

# 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://coova.org/wiki/index.php/CoovaChilli/UAMService
#
HS_UAMSERVICE=http://\$HS_UAMSERVER/sam/hotspotlogin.php


###
# Features not activated per-default (default to off)
#
# HS_RADCONF=off # Get some configurations from RADIUS or a URL (&#39;on&#39; and &#39;url&#39; respectively)
#
HS_ANYIP=on # Allow any IP address on subscriber LAN
#
# HS_MACAUTH=on # To turn on MAC Authentication
#
# HS_MACAUTHDENY=on # Put client in &#39;drop&#39; state on MAC Auth Access-Reject
#
# HS_MACAUTHMODE=local # To allow MAC Authentication based on macallowed, not RADIUS
#
# HS_MACALLOW="..." # List of MAC addresses to authenticate (comma seperated)
#
# HS_USELOCALUSERS=on # To use the /etc/chilli/localusers file
#
# HS_OPENIDAUTH=on # To inform the RADIUS server to allow OpenID Auth
#
# HS_WPAGUESTS=on # To inform the RADIUS server to allow WPA Guests
#
# HS_DNSPARANOIA=on # To drop DNS packets containing something other
# # than A, CNAME, SOA, or MX records
#
# HS_OPENIDAUTH=on # To inform the RADIUS server to allow OpenID Auth
# # Will also configure the embedded login forms for OpenID
#
# HS_USE_MAP=on # Short hand for allowing the required google
# # sites to use Google maps (adds many google sites!)
#
###
# Other feature settings and their defaults
#
# HS_DEFSESSIONTIMEOUT=0 # Default session-timeout if not defined by RADIUS (0 for unlimited)
#
# HS_DEFIDLETIMEOUT=0 # Default idle-timeout if not defined by RADIUS (0 for unlimited)
#
# HS_DEFBANDWIDTHMAXDOWN=0 # Default WISPr-Bandwidth-Max-Down if not defined by RADIUS (0 for unlimited)
#
# HS_DEFBANDWIDTHMAXUP=0 # Default WISPr-Bandwidth-Max-Up if not defined by RADIUS (0 for unlimited)

###
# Centralized configuration options examples

# HS_RADCONF=url # requires curl
# HS_RADCONF_URL=https://coova.org/app/ap/config

# HS_RADCONF=on # gather the ChilliSpot-Config attributes in
# # Administrative-User login
# HS_RADCONF_SERVER=rad01.coova.org # RADIUS Server
# HS_RADCONF_SECRET=coova-anonymous # RADIUS Shared Secret 
# HS_RADCONF_AUTHPORT=1812 # Auth port
# HS_RADCONF_USER=chillispot # Username
# HS_RADCONF_PWD=chillispot # Password


###
# 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 &#39;haserl&#39; 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=US # ISO Country code

HS_DYNIP=192.168.0.0
HS_DYNIP_MASK=255.255.255.0
HS_STATIP=192.168.0.0
HS_STATIP_MASK=255.255.255.0


พอ Restart เครื่อง ปรากฏว่าเครื่อง Client ได้รับ IP จาก Chilli ตามที่ต้องการ แต่ไม่สามารถออกเน็ตได้
Ping 192.168.0.1 ไม่เจอครับ

ปัญหานี้ควรแก้ยังไงดีครับ

=================================================================
2. ผมมีการ์ดแลนอีก 1 ตัว ต้องการแยกวงของเครื่อง Client ออกจากกัน ต้อง Config ยังไงบ้างครับ
เท่าที่ลอง Search ดู ต้องสร้าง ไฟล์ config ของ chilli ขึ้นมาใหม่อีกตัว แล้วสั่งรัน service เพิ่ม
ซึ่งลองแล้วมันไม่ทำงานครับ ;D

ถ้าท่านใดพอมีวิธีหรือเจอกระทู้เก่า ๆ เกี่ยวกับเรื่องนี้ช่วยแนะนำด้วยครับ (Search แล้วหาไม่เจอจริง ๆ ครับ)

//////////////////////////////////////////////////////////////////////
ลองดู rc.firewall.local อีกที่นึงครับ

My_Local_Net=
/////////////////////////////////////////////////////////
ปกติถ้าแก้ไฟล์ config ก่อน install ก็ไม่น่ามีปัญหานะครับ เพราะผมก็เจอปัญหาเหมือนคุณ ผมก็เลยลองลงใหม่ โดยก่อนลงผมได้แก้ config ที่อยู่ใน Folder SmileAuthenServer_V1.0b


แก้ไฟล์ config ดังนี้
mynet = '10.0.1.0\/24' วงแลนที่ท่านใช้อยู่ หรือที่ต้องการ พูดง่าย ๆ กลุ่ม ip ของเครื่อง Client นั่นเอง
myHS_NETWORK='10.0.1.100' เราต้องการให้ chill จ่าย ip ให้กับเครื่อง client ตั้งแต่ไอพีเบอร์อะไรก็ใส่ตรงนี้ครับ
myHS_NETMASK='255.255.255.0' วงของไอพีที่ต้องการ
myuamlisten = '10.0.1.1' ไอพีขา lan (eth1)


จากนั้นก็ทำการลงเลยครับ
โดยมีขั้นตอนดังนี้คือ
./config
./install
ถ้าลงไปแล้วอยากจะแก้ก็ไปแก้ได้ที่นี่ครับ /etc/chilli/hs.conf

ปล.ถ้าคุณใช้ IE ในการ access จะไม่สามารถเข้าได้นะ (สำหรับผมไม่ได้ ไม่ทราบว่าท่านอื่นได้ไหม) ผมใช้ Firefox ok ครับ ลองดูนะครับ อธิบายผิดพลาดตรงไหนชี้แนะด้วยนะครับ มือใหม่ครับ แต่ปัญหานี้พึ่งจะแก้ได้

ไม่มีความคิดเห็น:

แสดงความคิดเห็น