PyFi Spot is a HotSpot (Captive Portal) to be ran in a RaspberryPi.
There is a lot of information about Captive Portals on the Internet but none of them is complete. That's why I wrote PyFi Spot -the definitive guide.
- The user gets connected to the WiFi network
- if he is connected via a Smartphone, a notification is shown in his phone
- The user enters a URL in the browser
- He is redirected to our portal
- this is done by using some iptables rules
- Our portal is shown
- nginx + uwsgi + python 2.7 + flask
- The user logs in into the portal
- A new iptable rule is executed to allow him use the connection
- RaspberryPi
- Dongle WiFi (e.g. TL-WN722G or TL-WN322N)
- hostapd
- dnsmasq
- iptables rules
- PyFi Spot
- nginx
- uWSGI
- virtualenv
- Python 2.7
- Flask
- conntrack
NOTE: click on each link to read their docs.
This was meant to be used in courses and other events organized by the project Argentina en Python, so there are some other services offered by the RaspberryPi server.
- TileStache (OpenStreetMap Tile Server)
- memcache (optional)
- Offline Websites
- elblogdehumitos.com.ar
- argentinaenpython.com.ar
- tutorial.djangogirls.org
- tutorial.python.org.ar
- Chat with Prosody + Candy
- devpi-server
- There is no official release yet, although the code is working properly (I should have bugs -I'm sure).
- It was tested in a Django Girls Workshop at PyCon Argentina with more that 50 users. Yes, it worked, but the wireless connection was really congested. On the other hand, the RaspberryPi with ArchLinux ARM worked without any problem.
- http://netfilter.org/documentation/HOWTO//packet-filtering-HOWTO.txt
- https://es.wikipedia.org/wiki/Netfilter/iptables
- http://www.chillispot.org/
- http://stackoverflow.com/questions/1989214/google-com-and-clients1-google-com-generate-204/13365853#13365853
- http://serverfault.com/questions/679393/captive-portal-popups-the-definitive-guide
- http://www.andybev.com/index.php/Using_iptables_and_PHP_to_create_a_captive_portal
Manuel Kaufmann (https://twitter.com/reydelhumo)
GNU GENERAL PUBLIC LICENSE Version 2