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
Now connect to your box using SSH or Telnet. After you are logged in do:
cd /mnt/usb/captive_portal.01(if you named different, change as named)
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 192.168.1.1, 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).