wifidog 配置文件

article/2025/9/27 10:04:12

下面回到路由器,编辑wifidog.conf,一般情况下,我们之后配置ExternalInterfaceGatewayInterfaceAuthServer这三项就可以,其他默认。下面是我的配置:

opk安装包:luci-app-wifidog-all.ipk

链接:http://pan.baidu.com/s/1dFfD4M9 密码:qgoo



还有安装完插件后会在/etc/文件目录下释放一个wifidog.conf.example文件!用这个文件替换安装wifidog在/etc/目录下释放出来的wifidog.conf文件!
说明!wifidog.conf配置文件会有这几个接口配置:ExternalInterface、GatewayInterface、GatewayAddress 其中ExternalInterface是你的外网接口!EP:如果你是你是pppoe接入的就填入pppoe-wan ,若是DHCP的话就选择你的网卡定义 eth.x;GatewayInterface是你的内网接口,通常情况下都是填br-lan;GatewayAddress是你的LAN IP这个在上文中已经提到了,这里不做任何的阐述了!

接下来就是配置wifidong登陆的认证账号密码,安装该插件的时候会在/etc/目录下释放wifidog.auth文件!这里就是存放账号密码的地方!里面有一组默认的账号密码!如果想添加就按照上面的格式添加就可以了!

如果你有HTML+CSS甚至是DIV+CSS编程基础和经验,你可以自定义登录认证页面,其htm页面位于/usr/lib/lua/luci/view/wifidog/文件夹下,CSS等资源文件位于/www/wifidog/文件夹下。
注意!

1.密码不要设置过于简单!
2.此插件或多或少有bug,不能用于商业用途!
3.此插件仅测试用




/etc/wifidog.conf

# $Id$
# WiFiDog Configuration file# Parameter: GatewayID
# Default: default
# Optional
#
# Set this to the node ID on the auth server
# This is used to give a customized login page to the clients and for
# monitoring/statistics purpose. If you run multiple gateways on the same
# machine each gateway needs to have a different gateway id.
# If none is supplied, the mac address of the GatewayInterface interface will be used,
# without the : separators# GatewayID default# Parameter: ExternalInterface
# Default: NONE
# Optional
#
# Set this to the external interface (the one going out to the Inernet or your larger LAN).  
# Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise,
# Normally autodetectedExternalInterface eth1# Parameter: GatewayInterface
# Default: NONE
# Mandatory
#
# Set this to the internal interface (typically your wifi interface).    
# Typically br-lan for Openwrt (by default the wifi interface is bridged with wired lan in openwrt)
# and eth1, wlan0, ath0, etc. otherwise
# You can get this interface with the ifconfig command and finding your wifi interfaceGatewayInterface br-lan# Parameter: GatewayAddress
# Default: Find it from GatewayInterface
# Optional
#
# Set this to the internal IP address of the gateway.  Not normally required.GatewayAddress 192.168.1.1# Parameter: HtmlMessageFile
# Default: wifidog-msg.html
# Optional
#
# This allows you to specify a custome HTML file which will be used for
# system errors by the gateway. Any $title, $message and $node variables
# used inside the file will be replaced.
#
# HtmlMessageFile /opt/wifidog/etc/wifidog-.html# Parameter: AuthServer
# Default: NONE
# Mandatory, repeatable
#
# This allows you to configure your auth server(s).  Each one will be tried in order, untill one responds.
# Set this to the hostname or IP of your auth server(s), the path where
# WiFiDog-auth resides in and the port it listens on.
#AuthServer {
#	Hostname                 (Mandatory; Default: NONE)
#	SSLAvailable             (Optional; Default: no; Possible values: yes, no)
#	SSLPort                  (Optional; Default: 443)
#	HTTPPort                 (Optional; Default: 80)
#	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.)
#}
AuthServer {Hostname 192.168.1.1SSLAvailable noHTTPPort 80Path /cgi-bin/luci/LoginScriptPathFragment login/?PortalScriptPathFragment portal/?MsgScriptPathFragment msg/?PingScriptPathFragment ping/?AuthScriptPathFragment auth/?
}#AuthServer {
#    Hostname auth.ilesansfil.org
#    SSLAvailable yes
#    Path /
#}#AuthServer {
#    Hostname auth2.ilesansfil.org
#    SSLAvailable yes
#    Path /
#}# Parameter: Daemon
# Default: 1
# Optional
#
# Set this to true if you want to run as a daemon
# Daemon 1# Parameter: GatewayPort
# Default: 2060
# Optional
#
# Listen on this port
# GatewayPort 2060# Parameter: ProxyPort
# Default: 0 (disable)
# Optional
#
# Redirect http traffic of knowns & probations users
# to a local transparent proxy listening on ProxyPort port
# ProxyPort 0# Parameter: HTTPDName
# Default: WiFiDog
# Optional
#
# Define what name the HTTPD server will respond
# HTTPDName WiFiDog# Parameter: HTTPDMaxConn
# Default: 10
# Optional
#
# How many sockets to listen to
# HTTPDMaxConn 10# Parameter: HTTPDRealm
# Default: WiFiDog
# Optional
#
# The name of the HTTP authentication realm. This only used when a user
# tries to access a protected WiFiDog internal page. See HTTPUserName.
# HTTPDRealm WiFiDog# Parameter: HTTPDUserName / HTTPDPassword
# Default: unset
# Optional
#
# The gateway exposes some information such as the status page through its web
# interface. This information can be protected with a username and password,
# which can be set through the HTTPDUserName and HTTPDPassword parameters.
# HTTPDUserName admin
# HTTPDPassword secret# Parameter: CheckInterval
# Default: 60
# Optional
#
# How many seconds should we wait between timeout checks.  This is also
# how often the gateway will ping the auth server and how often it will
# update the traffic counters on the auth server.  Setting this too low
# wastes bandwidth, setting this too high will cause the gateway to take 
# a long time to switch to it's backup auth server(s).# CheckInterval 60# Parameter: ClientTimeout
# Default: 5
# Optional
#
# Set this to the desired of number of CheckInterval of inactivity before a client is logged out
# The timeout will be INTERVAL * TIMEOUT
ClientTimeout 5# Parameter: TrustedMACList
# Default: none
# Optional
#
# Comma separated list of MAC addresses who are allowed to pass
# through without authentication
#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D# Parameter: FirewallRuleSet
# Default: none
# Mandatory
#
# Groups a number of FirewallRule statements together.# Parameter: FirewallRule
# Default: none
# 
# Define one firewall rule in a rule set.# Rule Set: global
# 
# Used for rules to be applied to all other rulesets except locked.
FirewallRuleSet global {# FirewallRule syntax:# FirewallRule (block|drop|allow|log|ulog) [(tcp|udp|icmp) [port X]] [to IP/CIDR]## To block SMTP out, as it's a tech support nightmare, and a legal liability#FirewallRule block tcp port 25## Use the following if you don't want clients to be able to access machines on ## the private LAN that gives internet access to wifidog.  Note that this is not## client isolation;  The laptops will still be able to talk to one another, as## well as to any machine bridged to the wifi of the router.# FirewallRule block to 192.168.0.0/16# FirewallRule block to 172.16.0.0/12# FirewallRule block to 10.0.0.0/8## This is an example ruleset for the Teliphone service.#FirewallRule allow udp to 69.90.89.192/27#FirewallRule allow udp to 69.90.85.0/27#FirewallRule allow tcp port 80 to 69.90.89.205## Use the following to log or ulog the traffic you want to allow or block.# For OPENWRT: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies# iptables-mod-extra and iptables-mod-ulog (to adapt it to the linux distribution). # Note: the log or ulog rule must be passed before, the rule you want to match.# for openwrt: use of these feature requires modules ipt_LOG or ipt_ULOG present in dependencies# iptables-mod-extra and iptables-mod-ulog# For example, you want to log (ulog works the same way) the traffic allowed on port 80 to the ip 69.90.89.205:#FirewallRule log tcp port 80 to 69.90.89.205#FirewallRule allow tcp port 80 to 69.90.89.205# And you want to know, who matche your block rule:#FirewallRule log to 0.0.0.0/0#FirewallRule block to 0.0.0.0/0
}# Rule Set: validating-users
#
# Used for new users validating their account
FirewallRuleSet validating-users {FirewallRule allow to 0.0.0.0/0
}# Rule Set: known-users
#
# Used for normal validated users.
FirewallRuleSet known-users {FirewallRule allow to 0.0.0.0/0
}# Rule Set: unknown-users
#
# Used for unvalidated users, this is the ruleset that gets redirected.
#
# XXX The redirect code adds the Default DROP clause.
FirewallRuleSet unknown-users {FirewallRule allow udp port 53FirewallRule allow tcp port 53FirewallRule allow udp port 67FirewallRule allow tcp port 67
}# Rule Set: locked-users
#
# Not currently used
FirewallRuleSet locked-users {FirewallRule block to 0.0.0.0/0
}
然后直接运行 

/etc/init.d/wifidog enable

/etc/init.d/wifidog start

wifidog

具体配置


欢迎关注并加入物联网行业联盟,积累行业人脉和资源。



http://chatgpt.dhexx.cn/article/NS0sBhrP.shtml

相关文章

Portal Server搭建(wifidog安装)

可以参考这篇文档: http://dev.wifidog.org/wiki/doc/install/ubuntu/auth-server#Configurelocaleinwifidog.conf 一、 安装前准备 打开终端(用普通用户进入终端,不要用超级用户)。 sudo apt-get update sudo apt-get instal…

wifidog+authpuppy搭建WiFi 接入设备认证测试平台

0:前提 其实搭建认证环境都是基础,重要的是要对WiFidog的代码进行详细的研究,了解清楚wifidog与authpuppy之间进行了哪些数据交互,WiFidog的程序框架及iptables的建立及生效规则,这才是重点。WiFidog和之前nodogsplas…

wifidog authpuppy 服务器搭建

安装环境(64位 Ubuntu 14.04.4 LTS \n \l )一、安装各种软件包1、apache和php sudo apt-get updatesudo apt-get install apache2 php5 复制代码 2、安装数据库(postgresql或者mysql) sudo apt-get install postgresql 复制代码 3、安装需要的库 sudo ap…

wifidog认证流程图

一. 用户上线 1. 用户访问网络,通过iptables将未认证的用户dnat到wifidog进程,wifidog通过307报文将用户重定向到认证服务器 2. 用户打开认证服务器登录页面,输入用户名密码,发送认证请求 3. 认证成功的话服务器会发送302报文&…

wifidog+authpuppy认证页面的配置

路由器上用的是wifidog client,服务器后端管理用的是authpuppy。 首先,选择自己的操作系统,在http://www.authpuppy.org/doc/Main_Page网站里面,我的操作系统是Linux。 然后到这个网站http://www.authpuppy.org/doc/Getting_Star…

openwrt-看门狗watchdog

一、硬件watchdog和软件watchdog Linux内核不仅为各种不同类型的watchdog硬件电路提供了驱动,还提供了一个基于定时器的纯软件watchdog驱动,软件watchdog基于内核的定时器实现,当内核或中断出现异常时,软件watchdog是无法复位系统…

wifidog认证流程(图文版)

学习使用wifidog一段时间了,觉得这玩意真的不错,虽然有些代码写的不够严谨,运行效率不够高,但是少量人数情况下实现portal是很好的方案。 下面是我摘自一个博客的内容和apfree写的文档中的一部分发上来的,希望能对研究…

wifidog 认证

首先简单介绍一下什么是Portal认证,Portal认证,通常也会叫Web认证,未认证用户上网时,设备强制用户登录到特定站点,用户可以免费访问其中的服务。当用户需要使用互联网中的其它信息时,必须在门户网站进行认证…

Wifidog入门教程

曾经撸了两台K2路由器,刷成了华硕固件。以前就比较好奇什么肯德基,星巴克那种连上wifi就弹出一个页面进行验证什么的,是怎么弄的,昨天发现这个华硕固件里有这个功能,就是wifidog。 首先来看截图: 这里打开w…

wifidog安装以及自写wifidog认证服务器

前言 最近在做关于路由器认证相关的工作,由于需求,认证的过程同往常的网页认证有稍许不同,因此,自己开始尝试编写wifidog的认证服务器,查阅了中外的一些资料,现将经验总结一下。 Wifidog的原理 下图是在…

wifidog浏览器弹窗认证 — 基于OpenWRT路由器

一、移植 wifidog功能 1、功能介绍 wifidog是一种能够实现让路由器局域网设备(包括wifi连接和网线连接设备)在上网前先进行 portal认证的工具,主要应用于手机端上网认证,手机在连接wifi后会自动打开浏览器并跳转出 login界面,用户在该页面上…

WiFidog简介

WiFidog简介 WIFIdog是一种新的认证方式,这种认证方式的优势在于安全性高,不容易被破解验证。 客户端发出初始化请求,比如访问www.baidu.com网关的防火墙规则将这个请求重定向到本地网关的端口上。这个端口是Wifidog监听的端口。Wfidog提供一…

安装sysbench

一 安装依赖包 yum install gcc gcc-c autoconf automake libtool mysql-devel vim -y #验证是否安装 rpm -q --qf %{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n gcc \ gcc-c \ autoconf \ automake \ libtool \ mysql-devel \ vim 二 安装 cd /opt && git clon…

sysbench mysql_通过sysbench工具实现MySQL数据库的性能测试

1.背景 sysbench是一款压力测试工具,可以测试系统的硬件性能,也可以用来对数据库进行基准测试。sysbench 支持的测试有CPU运算性能测试、内存分配及传输速度测试、磁盘IO性能测试、POSIX线程性能测试、互斥性测试测试、数据库性能测试(OLTP基准测试)。目…

sysbench 压测 mysql_sysbench压测

一:sysbench的安装遇到的几个问题: 解决办法: yum install automake 解决办法:yum install libtool sysbench 的一些常用参数低版本和高版本是有点区别的大家在测试的时候稍微注意一下: 以下这个版本是0.5版本的但是我…

Sysbench常用命令

1 Sysbench 安装 requirements yum -y install make automake libtool pkgconfig libaio-devel# For MySQL support, replace with mysql-devel on RHEL/CentOS 5yum -y install mariadb-devel openssl-devel mysql-devel# For PostgreSQL supportyum -y install postgresql-…

sysbench性能测试

sysbench的官网地址是:http://sysbench.sourceforge.net Step 1: 下载安装: sysbench-0.5.tar.gz 解压后展开目录如下 [rootlocalhost mnt]# cd sysbench-0.5 [rootlocalhost sysbench-0.5]# ls aclocal.m4 autom4te.cache c…

mysql sysbench_MySQL sysbench基准测试

一、基准测试 参考《高性能 MySQL》第二章。 二、Sysbench sysbench 是开源的跨平台多线程基准测试工具,主要用于测试各种不同系统参数下的 CPU/内存/线程/IO/数据库等方面的性能,数据库目前支持 MySQL/Oracle/PostgreSQL。具体的参数设置,应…

sysbench mysql图表_sysbench_mysql

ref 测试 当执行下面这个sysbench测试mysql的时候,你不知道的可能可能是: 这到底是在测试读写?还是 读? 答: 只读 --num-threads12 啥意思? 答:就是说有12个线程在同时链接 你可以看到&#xff…

性能测试之sysbench

本期是写的测试mysql的性能测试,本人也是第一次接触mysql的性能,拿到这个任务时也是多方1查询资料, sysbench压力测试工具简介: sysbench是一个开源的、模块化的、跨平台的多线程性能测试工具,可以用来进行CPU、内存…