linux 系统安装wifidog

  1. 下载源码:
    1) 从svn checkout https://dev.wifidog.org/svn/trunk/wifidog-auth下载最新的wifidog 网关源码
    2) 从http://sourceforge.net/projects/wifidog/files/wifidog-gateway/下载wifidog 网关源码
    我使用第二种下载方法下载wifidog-20090925.tar.gz 版本,这是目前最新的wifidog。

  2. 解压: tar -zxvf wifidog-20090925.tar.gz

  3. cd wifidog-20090925; ./configure; make; make install, /usr/local/bin/目录下会多一个wifidog

  4. 到这里我们需要配置下源码根目录下的wifidog.conf,并再修改后将文件拷贝至 /usr/local/etc/,

    GatewayID default #网关的ID,如果不设置默认是网关interface 的 mac地址

    GatewayInterface br0  #网关使用的LAN Interface,必须设置
    
    GatewayAddress 192.168.1.1  #网关LAN 的IP地址,不设置默认从interface拿IP
    
    AuthServer   #必须设置
    {
        Hostname                 (Mandatory; Default: NONE)  #认证server 的主机名
        SSLAvailable             (Optional; Default: no; Possible values: yes, no) #认证server是否使用ssl协议
        SSLPort                  (Optional; Default: 443)  #认证server ssl协议端口
        HTTPPort                 (Optional; Default: 80)   #http协议端口
        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.)
    }
    
    GatewayPort 2060  #wifidog监听的端口
    
    CheckInterval 60   #检查连接网关客户端的流量,主要是用于流量更新、超时重新认证
    ClientTimeout 5  #checkinterval的间隔数,这里要注意,实际流量更新遗迹超时、检查使用的时间是CheckInterval * ClientTimeout
    
    TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D #MAC地址白名单
    

    后面还有一些关于网段、port 的黑白名单规则,以及其他一些设置,这里就不一一列举了。

  5. 启动wifidog -c /usr/local/etc/wifidog.conf 就可以和auth server交互了,auth server可以参考http://www.authpuppy.org 安装authpuppy,这里就不详细解释了

本文章由 http://www.wifidog.pro/2014/12/08/linux%E5%AE%89%E8%A3%85wifidog.html 整理编辑,转载请注明出处

标签: wifidog认证 wifidog安装 wifidog原理 wifidog分析 wifidog配置 wifidog流程 wifidog服务器 wifidog-ddwrt wifidog openwrt