wifidog配置分析

AuthServer {

Hostname                  (Mandatory; Default: NONE)

SSLAvailable              (Optional; Default: no; Possible values: yes, no)

SSLPort                  (Optional; Default: 443)

HTTPPort                  (Optional; Default: 80)

Path                      (Optional; Default: /wifidog/ Note:  The path must be both prefixed and suffixed by /.  Use a single / for server root.)

LoginScriptPathFragment  (Optional; Default: login/? Note:  This is the script the user will be sent to for login.)

PortalScriptPathFragment  (Optional; Default: portal/? Note:  This is the script the user will be sent to after a successfull login.)

MsgScriptPathFragment    (Optional; Default: gw_message.php? Note:  This is the script the user will be sent to upon error to read a readable message.)

PingScriptPathFragment    (Optional; Default: ping/? Note:  This is the script the user will be sent to upon error to read a readable message.)

AuthScriptPathFragment    (Optional; Default: auth/? Note:  This is the script the user will be sent to upon error to read a readable message.)

}

# Listen on this port

GatewayPort 2060

# Parameter: CheckInterval

# Default: 60

# Optional

#

# How many seconds should we wait between timeout checks.  This is also

# how often the gateway will ping the auth server and how often it will

# update the traffic counters on the auth server.  Setting this too low

# wastes bandwidth, setting this too high will cause the gateway to take

# a long time to switch to it's backup auth server(s).

CheckInterval 60

# Parameter: ClientTimeout

# Default: 5

# Optional

#

# Set this to the desired of number of CheckInterval of inactivity before a client is logged out

# The timeout will be INTERVAL * TIMEOUT

ClientTimeout 5

AuthServer是Portal服务器的配置项;GatewayPort是Wifidog监听的地址,默认是2060,一般保持默认即可;CheckInterval是心跳时长,单位是秒,什么是心跳呢,客户端认证成功之后,如果有网络访问动作,Wifidog getway就会每隔一段时间访问Portal服务器的一个脚本,用于认证计费,当然,如果客户使用超时或超流量,也可以通过心跳强制客户端下线。ClientTimeout是用户一次认证成功后的网络访问时长,超过这个时间需要重新认证,这个时长并非由ClientTimeout单独决定,取决于INTERVAL * TIMEOUT。详细的配置信息可以访问:http://dev.wifidog.org/browser/trunk/wifidog/wifidog.conf。

重点讨论Portal服务器的配置项,Hostname是Portal服务器的ip或者是域名,SSLAvailable和SSLPort是SSL加密配置,如果你的Portal服务器有配置HTTPS加密,则需要配置这两项;Path是指你的脚本路径(举例,http://a.com/to/,则a.com是域名,/to/是路径),注意路径必须以“/”开头和结尾,如果是根路径,则填一个“/”即可;接下来的5个配置指明你的脚本名,这说明了我们需要写五个脚本,我会详细说明。(以下文中涉及的“第几步”均是指Wifidog认证过程的步骤)

LoginScriptPathFragment配置项配置的是登陆脚本,它通过GET方式接受传入参数gw_address、gw_port、gw_id、mac和url,gw_address是AP Getway的ip地址;gw_port是Wifidog监听的端口,即上面介绍的wifidog.conf中的GatewayPort配置;gw_id是AP Getway的id,配置文件wifidog.conf中可以配置,默认值是default,这个值的作用是当存在


......本站只呈现部分内容,查看完整文章请到WiFiDog官网社区http://www.wifidog.pro/2015/04/03/wifidog%E9%85%8D%E7%BD%AE%E5%88%86%E6%9E%90-1.html ,转载请注明出处

你可能感兴趣的:(wifidog配置分析)