www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  2912 随笔 :: 9 文章 :: 51 评论 :: 185万 阅读

WifiDog:A captive portal suite

What is it composed of ?

A: It is composed of 2 components:

  1. The client is a daemon process - this gets installed on every wireless router
  2. The auth server is a web application - this gets installed in a central location

    What do I need ?

    1. Basic proficiency in a GNU/Linux environment
    2. A GNU/Linux OS with netfilter compiled into the kernel
    3. The iptables package
    4. The GNU C compiler (gcc). Other compilers may work, but we have not tested and will not support them.
    5. The latest Wifidog tarball which can be obtained from  SourceForge

    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

    More details can be found in the README.openwrt file.

    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.

posted on   秦瑞It行程实录  阅读(461)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
历史上的今天:
2014-05-23 CPP之面向对象篇
www.cnblogs.com/ruiyqinrui
点击右上角即可分享
微信分享提示