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地址白名單

  5. 後面還有一些關於網段、port 的黑白名單規則,以及其他一些設置,這裏就不一一列舉了。
  6. 啓動wifidog -c /usr/local/etc/wifidog.conf 就可以和auth server交互了,auth server可以參考安裝authpuppy,這裏就不詳細解釋了
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章