分类 wifidog认证 下的文章

Wifidog鉴权服务器wifidog-auth的搭建

原来已经配置好的apache2、python、trac系统
在/etc/apache2/sites-enabled下增加的新的配置文件(域名和对应的目录)

sudo /etc/init.d/apache2 restart

这是可以用新域名访问对应目录下index.php了,但无法执行php代码只能下载该文件

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5 # 安装遇到麻烦
sudo apt-get install postgresql
sudo apt-get install php5-cgi php5-common php5-pgsql php-pear php5-xmlrpc php5-curl language-pack-en-base subversion
sudo pear install XML_RPC
wget http://sourceforge.net/projects/phlickr/files/Phlickr-0.2.5.tgz
sudo pear install Phlickr-0.2.5.tgz
sudo apt-get install openssh-server
sudo apt-get install postfix

选择"internet site with smart host",然后配置
svn checkout https:// dev.wifidog.org/svn/trunk/wifidog-auth #放到/var/www目录下

现在修改文件/var/www/wifidog-auth/wifidog/classes/Dependency.php,否则智能安装会失败

$sudo vim /var/www/wifidog-auth/wifidog/classes/Dependency.php

将第122行改为:'website' => "http://www.smarty.net/"
将第123行改为:'installSourceUrl' => http://www.smarty.net/files/Smarty-2.6.26.tar.gz

$sudo vim /var/www/wifidog-auth/wifidog/config.php

将define('DEFAULT_LANG', 'fr_CA');改为define('DEFAULT_LANG', 'en_US');

本文章由 http://www.wifidog.pro/2015/02/27/wifidog%E6%9C%8D%E5%8A%A1%E5%99%A8wifidog-auth%E5%AE%89%E8%A3%85.html 整理编辑,转载请注明出处

openwrt 的 wifidog 安装说明

条件检查:

1 基本的linux环境,并且熟练使用

2 内核中带有netfilter的linux系统

3 iptables 包

4 gcc编译器,其他的编译器可能也行,但是没有经过测试

5 从sourceforge 获得的最新的wifidog的源码

安装准备工作

确保一切正常运行再继续进行下一步安装wifidog!!

  • 路由器能正常启动
  • 路由器可以启动接口
  • 路由器的路由正常运行
  • 路由器可以连接到internet
  • dns可以设置运行
  • dhcp正常运行
  • ipt_mac.o内核模块必须提前加载
  • 如果使用了NAT,路由器必须在iptables中正确的设置NAT/伪装 规则
  • wifi的客户的能够链接internet

以上条件在路由器启动或者重启后能自动的正常运行

开始安装

像任何开源的软件一样,先下载源码tarball,然后按照如下步骤安装 :

./autogen.sh

make

make install

在openwrt下安装wifidog:

mkdir ~/wifidog.openwrt
cd ~/wifidog.openwrt
wget http://downloads.openwrt.org/whiterussian/newest/OpenWrt-SDK-Linux-i686-1.tar.bz2
tar -jxvf OpenWrt-SDK-Linux-i686-1.tar.bz2
svn checkout https://dev.wifidog.org/svn/trunk/wifidog
cd wifidog
./autogen.sh
make ipk OPENWRTSDK=~/wifidog.openwrt/OpenWrt-SDK-Linux-i686-1

编译完成的包在:~/wifidog.openwrt/OpenWrt-SDK-Linux-i686-1/bin/packages

配置wifidog:编辑/etc/wifidog.conf

运行wifidog:

wifidog -f -d 7
  -f means to run in foreground (do not become a background daemon)
  -d 7 increases debug output level to the maximum

打开任意wifi的客户端,查看wifidog输出信息。

本文章由 http://www.wifidog.pro/2015/02/27/wifidog%E5%AE%89%E8%A3%85%E8%AF%B4%E6%98%8E.html 整理编辑,转载请注明出处

openwrt安装wifidog教程

Preparation

Prerequisites

Required Packages

  • iptables-mod-extra
  • iptables-mod-ipopt
  • kmod-ipt-nat
  • iptables-mod-nat-extra
  • libpthread

Installation

opkg update
opkg install wifidog
vi /etc/wifidog.conf
/etc/init.d/wifidog enable
/etc/init.d/wifidog start
netstat -a

You can also run wifidog in foreground/debug mode:

wifidog -f -d 7
  -f means to run in foreground (do not become a background daemon)
  -d 7 increases debug output level to the maximum

Configuration

Start on boot

To enable/disable start on boot:
/etc/init.d/wifidog enable this simply creates a symlink: /etc/rc.d/S?0??? → /etc/init.d/???
/etc/init.d/wifidog disable this removes the symlink again

本文章由 http://www.wifidog.pro/2015/02/27/openwrt%E5%AE%89%E8%A3%85wifidog-2.html 整理编辑,转载请注明出处

install wifidog in linux

Pre-installation

This is where a lot of people run into problems, so let's state this in bold:
MAKE SURE EVERYTHING WORKS FIRST BEFORE INTRODUCING Wifidog INTO THE ENVIRONMENT
That especially means:

  • The router must boot properly
  • The router must bring up the interfaces properly
  • The router must set up the routes properly
  • The router must connect to the internet properly
  • DNS settings must be set or obtained properly. DNS must work.
  • DHCP settings (client, server or both) must be set or obtained properly.
  • The ipt_mac.o kernel module must be loaded.
  • If using NAT, the router must setup NAT/masquerading rules with iptables properly
  • Clients on the desired (WIFI) network must be able to bind, associate, lease and connect the internet properly
  • All the above must happen automatically when the router starts or gets rebooted

Do NOT proceed with installing Wifidog until you've satisfied the above. It will not work otherwise and you will waste lots of time.

Installation

Wifidog, like many open source projects, is distributed with standard autotools utilities to make installation easy. Unpack the tarball (from Sourceforge) or get the lastest source from SVN (see Download menu), then follow the standard:

./autogen.sh
make
make install

If you do not install it with make install, then you will find the compiled wifidog gateway binary in src/wifidog (also don't forget to copy wifidog.conf to /etc).

OpenWrt? ipkg

mkdir ~/wifidog.openwrt
cd ~/wifidog.openwrt
wget http://downloads.openwrt.org/whiterussian/newest/OpenWrt-SDK-Linux-i686-1.tar.bz2
tar -jxvf OpenWrt-SDK-Linux-i686-1.tar.bz2
svn checkout https://dev.wifidog.org/svn/trunk/wifidog
cd wifidog
./autogen.sh
make ipk OPENWRTSDK=~/wifidog.openwrt/OpenWrt-SDK-Linux-i686-1

If there were no errors, your package should be in ~/wifidog.openwrt/OpenWrt-SDK-Linux-i686-1/bin/packages

Configuration

Edit /etc/wifidog.conf and follow the instructions in the file. Things should be self-explanatory.

Running Wifidog for the first time

Run Wifidog with the following switches:

wifidog -f -d 7
  -f means to run in foreground (do not become a background daemon)
  -d 7 increases debug output level to the maximum

Testing

As a client on the WiFi network (or whatever interface is configured as the LAN interface in /etc/wifidog.conf), open a web browser and try to browse to your favourite web site.

Monitor the output of the running Wifidog to see what it's doing.

本文章由 http://www.wifidog.pro/2015/02/27/linux%E5%AE%89%E8%A3%85wifidog%E6%95%99%E7%A8%8B.html 整理编辑,转载请注明出处