wifi用户认证解决方案——Wifidog+Authpuppy的程序安装与配置
2016-10-18 19:11
656 查看
最近实验室在做一个项目,其中需要wifi的接入认证,自己写一个认证系统比较麻烦,先用wifidog进行实验测试。在此我将这几天做的事做个整理总结。
搭建wifidog系统主要就三大步,一是在OpenWrt的路由器上安装Wifidog应用程序,二是在服务器上安装authpuppy认证服务,三是配置网络结点和路由器认证
工作环境: 服务器:ubuntu 16.04 + authpuppy
路由器:NetGear WNDR3800 + wifidog
1. 在OpenWrt系统的源码文件下,编辑feeds.conf.default文件
在其中增加一行:
搭建wifidog系统主要就三大步,一是在OpenWrt的路由器上安装Wifidog应用程序,二是在服务器上安装authpuppy认证服务,三是配置网络结点和路由器认证
工作环境: 服务器:ubuntu 16.04 + authpuppy
路由器:NetGear WNDR3800 + wifidog
[b]一、在OpenWrt的路由器上安装Wifidog应用程序[/b]
安装Wifidog程序有两种方式,一种是在刷了OpenWrt的路由器上直接安装Wifidog;或者是把Wifidog直接编译进OpenWrt中。由于项目还需要安装其他程序,这里我选择第二种方式。1. 在OpenWrt系统的源码文件下,编辑feeds.conf.default文件
vim feeds.conf.default
在其中增加一行:
src-git wifidog https://github.com/wifidog/wifidog-gateway.git[/code]
2. 然后更新,再安装:./scripts/feeds update -a ./scripts/feeds install -a
3. 终端执行编译命令make menuconfig
4. 在Network/captive portals/下选择wifidog 就有选择 WiFiDog 这一项了二、在服务器上安装authpuppy认证服务
1、首先安装authpuppy服务端验证
1. 安装php开发环境:sudo apt-get install apache2 php-mysql libapache2-mod-php mysql mysql-server
2. 启用apache rewrite,否则会出现(Therequested URL /install/3 was not found on this server.)错误sudo a2enmod rewrite
3. 到https://launchpad.net/authpuppy 从http://launchpad.net/authpuppy下载authpuppy最新源码,解压并移动到/var/www/目录下。tar xvzf authpuppy-<version>-<stability>_<packaging>.tgz sudo mv authpuppy /var/www/
4. 为authpuppy赋予权限chmod 777 /var/www/html/authpuppy/ -R
5. 修改/etc/apache2/sites-enabled/000-default.conf替换所有内容sudo gedit /etc/apache2/sites-enabled/000-default.conf
修改如下:<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName authpuppy.localhost ServerAlias authpuppy.test DocumentRoot /var/www/authpuppy/web DirectoryIndex index.php <Directory /var/www/authpuppy/web/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> Alias /sf /var/www/authpuppy/lib/vendor/symfony/data/web/sf <Directory "/var/www/authpuppy/lib/vendor/symfony/data/web/sf"> AllowOverride All Allow from All </Directory> ErrorLog /var/log/apache2/authpuppy/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/authpuppy/access.log combined </VirtualHost>
6. 重启apachesudo service apache2 restart
7. Mysql数据库的创建
authpuppy需要使用数据库进行用户认证管理,可以使用mysql创建一个名为authpuppy的数据库。user@yourserver $> mysqladmin -uroot -p create authpuppy
8. 访问http://localhost出现authpuppy配置页面
9. 点击下一步继续,这一步会检测系统的环境是否满足authpuppy的要求,不满足的会显示红色,按要求配置好就可以点击下一步了。
10. wifidog数据库的配置。填写在低7步创建的数据库名字,并填写你的数据库账号和密码等信息,此处为了方便,使用root登录,读者可以新建一个user用于访问。
11. 一直点击下一步,直到出现管理员用户配置页面,配置用户信息:
12. 最后配置成功,出现如下页面,此时authpuppy的基本配置完成:
13. 以后再次访问http://localhost,就会出现如下页面,不需要重新配置了:2、配置服务器和插件管理
1. 访问http://localhost ,通过管理员账户登录,配置authserver
2. 配置完成后再次访问http://localhost 就会出现如下界面
3. 点击Manageplugins,点击View all available plugins and updates添加插件,
安装apAuthLocalUserPlugin这个插件,并启用,就可以对登录账号进行管理了,更多插件的使用可以自己慢慢摸索。三、配置网络结点和路由器认证
1. 访问http://localhost 以管理员身份登录,点击Managenodes进行结点的管理,服务器默认为我们创建了一个叫My first node的结点,我们对其进行编辑,修改Name :wifidog,gw id:123456,deployment status 选择Deployed
2. 登录到路由器(linux直接使用ssh命令,windows下可以使用putty、xshell等工具),编辑/etc/wifidog.conf,需要配置的主要有三项:#这个需要与服务器中gw id相对应 GatewayID 123456 #查看自己的路由器进行配置,外网接口 ExternalInterfaceeth0.2 #路由器内网接口 GatewayInterface br-lan #服务器配置 AuthServer { #服务器的ip地址 Hostname192.168.0.224 SSLAvailable yes Path / }
3. 启动wifidog/etc/init.d/wifidog enable /etc/init.d/wifidog start
4. 连接该无线网络,开始验证。
本文有部分内容来自文章——公共场所wifi认证解决方案wifidog+authpuppy
over
相关文章推荐
- wifidog+authpuppy认证页面的配置
- wifidog+authpuppy认证页面的配置
- 公共场所wifi认证解决方案wifidog+authpuppy
- wifidog+authpuppy认证页面的配置
- wifidog+authpuppy认证流程详解
- wifidog+authpuppy搭建WiFi 接入设备认证测试平台
- SQL Server2008安装报错,解决方案(创建 system.diagnostics 的配置节处理程序时出错)
- Centos 7.2 安装配置带用户认证的squit正向代理
- LAMP架构(nginx安装,默认虚拟主机,用户认证,域名重定向,nginx配置文件详解)
- sql安装出错,安装程序配置服务器失败的解决方案 [转]
- wifidog+authpuppy搭建web认证系统
- WifiDog logo无线热点认证解决方案 WifiDog
- Centos 6.5上Apache + PAM + SVN服务安装配置(使用本地系统用户认证)
- CentOS 7 安装配置带用户认证的squid代理服务器
- 安装VS2012以后打开office 2007 的任何程序都跳出VS2012配置界面的解决方案
- Linux -- Web服务器配置之用户认证;Perl语言解释器的安装
- centos6.5下vsftpd服务的安装及配置并通过pam认证实现虚拟用户文件共享
- linux的Nginx安装、默认虚拟主机、用户认证、域名重定向配置介绍