openwrt下wifidog+authpuppy搭建web认证系统
client采用wifidog,可以在openwrt的menuconfig后network – captive portals下找到
server采用wifidog新推荐的authpuppy
authpuppy的安装配置可参考http://www.authpuppy.org/doc/Getting_Started
除了部分细节,基本可完全按其成功配置
目前遗留问题:
mysql配置好后无法通过安装页面登录,虽然在终端下正常。只能转而采用postgresql。
路由器wifidog启动后,访问web是会跳转到认证登录界面,但选择连接network login成功登录后还是无法访问internet而还是跳转到认证页面。
原因不知是否是因为server在路由的内部网络,或者wifidog的配置问题。
附wifidog配置wifidog.conf
GatewayID default
ExternalInterface pppoe-wan
GatewayInterface br-lan
AuthServer {
Hostname 192.168.1.111
HTTPPort 80
Path /authpuppy/web/
}
HTTPDMaxConn 100
ClientTimeout 10
FirewallRuleSet global {
FirewallRule allow to 123.150.205.139 #S
FirewallRule allow to 125.39.111.239 #S
FirewallRule allow to 42.121.98.148 #S
FirewallRule allow to 74.117.62.156 #S
FirewallRule allow to 74.117.62.157 #S
FirewallRule allow to 8.8.8.8 #S
}
FirewallRuleSet validating-users {
FirewallRule allow to 0.0.0.0/0
}
FirewallRuleSet known-users {
FirewallRule allow to 0.0.0.0/0
}
FirewallRuleSet unknown-users {
FirewallRule allow udp port 53
FirewallRule allow tcp port 53
FirewallRule allow udp port 67
FirewallRule allow tcp port 67
FirewallRule block udp port 8000
}
wifidog.conf字段的含义可参考http://dev.wifidog.org/browser/trunk/wifidog/wifidog.conf
本文章由 http://www.wifidog.pro/2015/02/05/openwrt-wifidog-3.html 整理编辑,转载请注明出处