User Tools

Site Tools


Captive Portal for PirateBox / LibraryBox

PirateBox tries to be as much as a free Internet connection as possible, that also includes not to use a captive portal like in hotels.

Since HTTPS is everywhere it becomes hard stay in this way, because a lot of people drop into https pages, which do not work on our *box software.

In any captive portal, you need to keep track of the connected user, who accepted the captive portal. This is either the IP or/and the MAC address.


Works for LibraryBox 2.x & PirateBox 1.0.x on OpenWrt AA

Nodogsplash is a big suite to provide captive portals. It also keeps track of tranfered data. This is the first implementation of a captive portal. It totally breaks a lot of stock automatic configuration based upon piratebox.conf. If you plan to modify you box, do it before adding this script.

Basic steps to implement this

  1. Download The Zip file contains only the binary-packages for ar71xx based devices. If you are running on top of another hardware plattform, consider to collect the packages yourself and comment/change the opkg-line inside the script.
  2. Put you box offline
  3. Take the USB stick to your computer
  4. Copy over the and extract it
  5. Savely remove the USB stick, put it back and power it on

Now connect to your box using SSH or Telnet. After you are logged in do:

  1. cd /mnt/usb/captive_portal.01 (if you named different, change as named)
  2. sh
  3. reboot


Note: You need to login once per device until the timeout expires, nodogsplash get stoped and started (reboot does not work) or the box gets rebooted. I did not deliver the content for the nodogsplash page you get displayed. Please adjust it yourself and make a backup before. To login in the shipped configuration Click the dog.

Note: The webserver is now limited to the IP, which makes IPv6 impossible and may break mesh features, if used.

The splash page, you see on the browser, copied to the USB stick in LibraryBox/captive_portal, there you can edit the apearance. Make a backup before starting, because creating the correct link to “enter” the Box, is a bit difficult (but you see it in the example).

  • Version 2:
    • Take care if the USB stick is with LibraryBox or PirateBox folder. Make use of configuration file
    • Print script version
captive_portal.txt · Last modified: 2015/12/10 07:51 by matthias