分类 wifidog安装 下的文章

About The Wifidog Captive Portal

The Wifidog project is a complete and embeddable captive portal solution for those who wish to operate a open hotspot or network of hotspots while preventing abuse of their Internet connection.

The Wifidog project was started by Île sans fil and is currently in production. Existing captive portal solutions were either almost impossible to embed ( NoCat, which relies on perl, GnuPG , OpenSSL), or only designed to display disclaimers with no access control at all (NoCatSplash and others). Wifidog is designed to have optional centralized access control, full bandwidth accounting, node heartbeating and local content specific to each hotspot. It does not rely on a javascript window, so it works with any platform with a web browser, including PDAs and cellphones. It is developed in C to make it easy to include in embedded systems (It has been designed for the Linksys WRT54G, but runs on any recent Linux platform). A typical install only takes 30kb on i386, and a fully functionnal install could be made in under 10 kb if necessary.

The portal suite is mainly an authentication server coded in PHP using a PostgreSQL database. On the other side, the Wifidog gateway connects to the auth-server for directive based on information submited by users in one of the hotspots. All administration/logical stuff are in the authentication server and the gateway is only playing with gateway firewall rules to allow or deny the users access.

Also of note are the extensive LBC (location-based content) management features available. There are some LBS (location-based service) features available and they continue to be an area of development.

引用自:http://dev.wifidog.org/wiki/About
本文章由 http://www.wifidog.pro/2015/01/07/wifidog%E5%8A%9F%E8%83%BD.html 整理编辑,转载请注明出处

wifidog添加到openwrt

Openwrt编译x86,for VMware虚拟机

记录一下自己编译x86的过程

从make menuconfig说起

目标系统(Target System)当然是选择x86了,至于Subtarget和Target Profile,使用默认的Generic就可以了

然后是目标镜像(Tartget Images),选择ext4和Build VMware image files (VMDK)
(在trunk版中是ext4,在backfire中是ext2,两个都可以的)

接下来,在内核模块(Kernel modules)的网络设备(Network Devices)中,选中VMware网卡
Openwrt官网写着必须选中e1000,但仅有这个是不够的,而且目标系统选择了x86,e1000就自动必选了
不知道VMware是什么网卡的,可以在自己的Ubuntu里lspci下(我是用Ubuntu编译Openwrt,看你自己了)

然后就是选择一些自己需要的模块了,完了就make V=99
(悲剧的是trunk中选了php5编译失败,backfire就可以)

等编译完成,新建一个虚拟机,然后删除该虚拟机的硬盘
将编译得到的镜像拷贝到该虚拟机目录
重新添加一个硬盘,指定使用编译的镜像

至于网卡嘛,第一块就是eth0,再添加一块就是eth1,依次类推
比如我用第一块做lan,第二块做wan,(VMnet9是一个普通的虚拟机网段,不是桥接,不是NAT,也不是host-only)

然后开机(Openwrt),编辑network,添加一个wan接口,同时给lan加了个nat参数

于是,就可以上网了
当然,如果第2块网卡使用桥接,就可以用Openwrt进行拨号
其他虚拟机只要把网卡设置为VMnet9,就能自动获取Openwrt DHCP分配的地址

本文章由 http://www.wifidog.pro/2015/01/06/openwrt%E6%B7%BB%E5%8A%A0wifidog.html 整理编辑,转载请注明出处

wifidog编译

openwrt编译前需要做的事
编译前:

  1. make menuconfig
       这次openwrt升级后, 编译完刷上固件,openwrt会自动进入failsafe模式。怎么编译都不行。 后来发现, 新的固件里面选择了 Kernel Modules\Other modules\kmod-button-hotplug 模组。这个模组在启动的时候,触发了"f"或者“enter”按键,所以在启动的过程中就自动进入了failsafe模式。取消选择后,一切正常。

  2. 不要整个LUCI, 只是要Luci rpc模块的话, Luci\Collection\Luci不要选择。 则整个web界面都不会被安装。只有rpc的功能会存在。

  3. Openwrt默认不开启wifi,要开启的话, 修改这个文件:

    vi openwrt/trunk/package/kernel/mac80211/files/lib/wifi/mac80211.sh.

    滚到文件最后, 注释掉

    REMOVE THIS LINE TO ENABLE WIFI:
    option disabled 1

  4. openwrt默认开机启动ssh的方法参见:http://www.2cto.com/os/201304/204073.html

  3.1 Openwrt下的路径:package/network/services/dropbear/files/dropbear.config

  [openwrt@root files]$ vim dropbear.config
   1 config dropbear
   2 option PasswordAuth 'on'
   3 option RootPasswordAuth 'on'
   4 option Port '22'
   5 option Interface 'lan'
   6# option BannerFile '/etc/banner'

openwrt/trunk/package/base-files/files/etc/shadow

root:$1$uml/DyCk$QHYqbMVYwxtE4Tk.SVifM.:15838:0:99999:7:::

密码:123456
  1. Luci 的文件拷贝到

rpc.lua 拷贝到 openwrt/trunk/feeds/luci/modules/rpc/luasrc/controller
openwrt/trunk/feeds/luci/libs/web/luasrc

本文章由 http://www.wifidog.pro/2015/01/06/wifidog%E7%BC%96%E8%AF%91.html 整理编辑,转载请注明出处

wifidog-openwrt x86虚拟机运行

openwrt x86在虚拟机中运行方法(vmware和 VirtualBox)
首先安装vmware或VirtualBox虚拟机软件(个人推荐VirtualBox),再去openwrt官网下载openwrt-x86-ext2.image镜像文件, 用VirtualBox的命令行方式: VBoxManage convertfromraw --format VMDK openwrt-x86-ext2.image openwrt-x86-2.6-ext2.vmdk 把下载到的镜像文件转换成vm的虚拟磁盘格式. 运行虚拟机软件,建立新虚拟机,128M内存就够了,硬盘就用上面转换出来的vmdk文件,不要忘了用桥接方式加2块以上网卡,1Lan,1Wan (vm最多可以加10块网卡,VirtualBox可以加8块,4块可以直接加,另外4块可以建完虚拟机后修改xml配置文件得到) 启动虚拟机,设本机IP为192.168.1.X,直接在浏览器中输入192.168.1.1,就能进入openwrt的web配置界面了.

本文章由 http://www.wifidog.pro/2015/01/06/wifidog-openwrt-x86%E8%99%9A%E6%8B%9F%E6%9C%BA.html 整理编辑,转载请注明出处