标签 wifidog认证 wifidog安装 wifidog原理 wifidog分析 wifidog配置 wifidog流程 wifidog服务器 wifidog-ddwrt wifidog openwrt 下的文章

openwrt 配置wifidog 相关的network

Configuring OpenWrt Network
The network configuration in Kamikaze is stored in /etc/config/network and is divided into interface configurations. Each interface configuration either refers directly to an ethernet/wifi interface (eth0, wl0, ..) or to a bridge containing multiple interfaces. It looks like this:

config interface     "lan" 
      option ifname    "eth0" 
      option proto     "static" 
      option ipaddr    "192.168.1.1" 
      option netmask   "255.255.255.0" 
      option gateway   "192.168.1.254" 
      option dns       "192.168.1.254"

ifname specifies the Linux interface name. If you want to use bridging on one or more interfaces, set ifname to a list of interfaces and add:

option type     "bridge"

It is possible to use VLAN tagging on an interface simply by adding the VLAN IDs to it, e.g. eth0.1. These can be nested as well.

This sets up a simple static configuration for eth0. proto specifies the protocol used for the interface. The default image usually provides ’none’ ’static’, ’dhcp’ and ’pppoe’. Others can be added by installing additional packages.

When using the ’static’ method like in the example, the options ipaddr and netmask are mandatory, while gateway and dns are optional. You can specify more than one DNS server, separated with spaces.

DHCP currently only accepts ipaddr (IP address to request from the server) and hostname (client hostname identify as) - both are optional.
PPP based protocols (pppoe, pptp, ...) accept these options:

  • username: The PPP username (usually with PAP authentication)
  • password: The PPP password
  • keepalive: Ping the PPP server (using LCP). The value of this option specifies the maximum number of failed pings before reconnecting. The ping interval defaults to 5, but can be changed by appending "," to the keepalive value
  • demand: Use Dial on Demand (value specifies the maximum idle time.
  • server(pptp): The remote pptp server IP

For all protocol types, you can also specify the MTU by using the mtu option.

Setting up static routes
You can set up static routes for a specific interface that will be brought up after the interface is configured.
Simply add a config section like this:

  config route foo 
   option interface lan 
   option target 1.1.1.0 
   option netmask 255.255.255.0 
   option gateway 192.168.1.1

The name for the route section is optional, the interface, target and gateway options are mandatory. Leaving out the netmask option will turn the route into a host route.

Setting up the switch (currently broadcom only)
The switch configuration is set by adding a ’switch’ config section. Example:

  config switch       "eth0" 
      option vlan0    "1 2 3 4 5*" 
      option vlan1    "0 5"

本文章由 http://www.wifidog.pro/2015/01/08/openwrt-network-wifidog.html 整理编辑,转载请注明出处

Openwrt 添加wifidog

OpenWrt source repository downloads

You can either check out the OpenWrt source code via git or svn.
GIT
The recommended way of checking out the OpenWrt source code is cloning the Git repository using one of the following commands:
trunk (main development tree)

  • Main repository

    git clone git://git.openwrt.org/openwrt.git

14.07 branch (Barrier Breaker)

  • Main repository

    git clone git://git.openwrt.org/14.07/openwrt.git

12.09 branch (Attitude Adjustment)

  • Main repository

    git clone git://git.openwrt.org/12.09/openwrt.git

  • Packages feed

    git clone git://git.openwrt.org/12.09/packages.git

SVN
You can checkout the source from the OpenWrt Subversion repository using one of the following commands:

  • Development branch:

    svn co svn://svn.openwrt.org/openwrt/trunk/

  • Barrier Breaker 14.07 branch:

    svn co svn://svn.openwrt.org/openwrt/branches/barrier_breaker

  • Attitude Adjustment 12.09 branch:

    svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment

  • Backfire 10.03 branch:

    svn co svn://svn.openwrt.org/openwrt/branches/backfire

  • Kamikaze 8.09 branch:

    svn co svn://svn.openwrt.org/openwrt/branches/8.09

  • Kamikaze 7.09 branch:

    svn co svn://svn.openwrt.org/openwrt/tags/kamikaze_7.09

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

wifidog之openwrt固件

What is OpenWrt?

Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with optional package management. This frees you from the restrictions of the application selection and configuration provided by the vendor and allows you to use packages to customize an embedded device to suit any application. For developers, OpenWrt provides a framework to build an application without having to create a complete firmware image and distribution around it. For users, this means the freedom of full customization, allowing the use of an embedded device in ways the vendor never envisioned.

  • Free and open-source. The project is entirely free and open-source, licensed under the GPL. The project is intended to always be hosted at an easily accessible site, with full source code readily available and easy to build.
  • Easy and free access. The project will always be open to new contributors and have a low barrier for participation. Anyone shall be able to contribute. We, the current developers, actively grant write access to anyone interested in having it. We believe people are responsible when given responsibility. Just ask and you will be able to acquire the access rights you need.
  • Community driven. This is not about 'us' offering 'you' something, it is about everyone coming together to work and collaborate towards a common goal.

OpenWrt has long been established as the best firmware solution in its class. It far exceeds other embedded solutions in performance, stability, extensibility, robustness, and design. It is the clear-cut goal of the OpenWrt developers to continue to expand development and ensure that OpenWrt is the foremost framework for innovative and ingenuitive solutions.

本文章由 http://www.wifidog.pro/2015/01/07/wifidog-openwrt-1.html 整理编辑,转载请注明出处

wifidog 功能

Auth server (Current)

  • Node-specific content features. Wifidog-auth has a very cool local content architecture.
    RSS feed support (optional, with magpierss), one feed per node (url stored in the database, works great, but no gui to edit it yet) and one network-wide RSS feed.
  • Configuration and integration
    No need to set any path in the web server config files
    All paths are editable from the config file
    Quick setup: the network name, url, default RSS, and similar data are set from the config file, and will be displayed as needed throughout the system.
    Can import all users and passwords from a NoCat password file [WWW] More info].
  • Development
    Demo page to let people to hack on it more easily
    Database abstraction layer with very nice debugging features (just append true at the end of the call and you'll see the query, the results, the query plan, and the number of affected rows. Porting to another database only requires porting one file. Currently uses Postgres.)
  • User management (end user)
    Users can create and activate accounts without admin intervention. The user will be granted a 15 minute grace period after signing up in order to retrieve and validate his email.
    Users can request that the server re-send the validation email
    Users can change their passwords
    Users who forget their username can have it mailed to them.
    Users who lose their password can ask the system to generate a new one and mail it to them.
    Email must be valid but isn't displayed in order to preserve user privacy.
    Users can login using either email or username
    Enforces (politely) that duplicate email addresses are not allowed in the database
  • Logging and monitoring
    MAC address logging (in case it is a legal requirement in your country)
    Sends the original url before redirecting to the central server in order to allow linking on the portal page
    Multi-language support
    Script and sql execution time breakdown. Already implemented, just needs to be packaged to be usable by the templates.
  • Reports and Statistics

Gateway (Current)

  • Supports using backup auth servers if the primary one doesn't respond.
  • Runtime query interface
  • One rule to jump in, one to jump out rejects, one to jump out accepts
  • Detects the IP address of a network interface automatically, instead of specifying it separately in the configuration file.

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