1. 下載源碼:
1) 從svn checkout https://dev.wifidog.org/svn/trunk/wifidog-auth下載最新的wifidog 網(wǎng)關(guān)源碼
2) 從http://sourceforge.net/projects/wifidog/files/wifidog-gateway/下載wifidog 網(wǎng)關(guān)源碼
我使用第二種下載方法下載wifidog-20090925.tar.gz 版本城豁,這是目前最新的wifidog揩慕。
2. 解壓: tar -zxvf wifidog-20090925.tar.gz
3. cd wifidog-20090925; ./configure; make; make install, /usr/local/bin/目錄下會(huì)多一個(gè)wifidog
4. 到這里我們需要配置下源碼根目錄下的wifidog.conf,并再修改后將文件拷貝至 /usr/local/etc/,
GatewayID default? #網(wǎng)關(guān)的ID未巫,如果不設(shè)置默認(rèn)是網(wǎng)關(guān)interface 的 mac地址
GatewayInterface br0? #網(wǎng)關(guān)使用的LAN Interface唇敞,必須設(shè)置
GatewayAddress 192.168.1.1? #網(wǎng)關(guān)LAN 的IP地址鼻由,不設(shè)置默認(rèn)從interface拿IP
AuthServer? #必須設(shè)置
{
Hostname? ? ? ? ? ? ? ? (Mandatory; Default: NONE)? #認(rèn)證server 的主機(jī)名
SSLAvailable? ? ? ? ? ? (Optional; Default: no; Possible values: yes, no) #認(rèn)證server是否使用ssl協(xié)議
SSLPort? ? ? ? ? ? ? ? ? (Optional; Default: 443)? #認(rèn)證server ssl協(xié)議端口
HTTPPort? ? ? ? ? ? ? ? (Optional; Default: 80)? #http協(xié)議端口
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監(jiān)聽的端口
CheckInterval 60? #檢查連接網(wǎng)關(guān)客戶端的流量,主要是用于流量更新厚棵、超時(shí)重新認(rèn)證
ClientTimeout 5? #checkinterval的間隔數(shù)蕉世,這里要注意,實(shí)際流量更新遺跡超時(shí)婆硬、檢查使用的時(shí)間是CheckInterval * ClientTimeout
TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D #MAC地址白名單
后面還有一些關(guān)于網(wǎng)段狠轻、port 的黑白名單規(guī)則,以及其他一些設(shè)置彬犯,這里就不一一列舉了向楼。
5. 啟動(dòng)wifidog -c /usr/local/etc/wifidog.conf 就可以和auth server交互了,auth server可以參考http://www.authpuppy.org 安裝authpuppy谐区,這里就不詳細(xì)解釋了
本文由?http://www.wifidog.pro/2014/12/08/linux%E5%AE%89%E8%A3%85wifidog.html整理編輯湖蜕,轉(zhuǎn)載請(qǐng)注明出處