Wireless Hacks Free Open Book

Wireless Hacks

Previous Section Next Section

Hack 90 NoCatSplash and Cheshire

figs/expert.giffigs/hack90.gif

If you need a simple "splash screen" for your wireless users, try either of these simple captive portals.

Some people find that Perl is too heavy of a requirement for their gateway hardware, making it impractical to use NoCatAuth. If you are only looking for a "click here to continue" sort of splash page (without the full authentication mechanism), you may be interested in NoCatSplash. It is a port of NoCatAuth entirely rewritten in C. Its requirements are quite small, but it supports only simple open mode portal functionality. The current version works under Linux, and portability to BSD and other systems is planned for the near future.

To install NoCatSplash, download the current CVS tree or just grab the archive available at http://nocat.net/download/NoCatSplash/. Unpack the archive, navigate to NoCatSplash-nightly/, and install it with a simple:

rob@florian:~/NoCatSplash-nightly$ ./configure; make; make install

This installs splashd to /usr/local/sbin/, and puts the nocat.conf configuration file in /usr/local/etc/. Edit the nocat.conf file to your tastes, taking note to set the ExternalDevice, InternalDevice, LocalNetwork, and DNSAddr options to fit your network layout. See the comments in the configuration file for details.

Start the portal by running splashd as root:

root@florian:~# /usr/local/sbin/splashd &

NoCatSplash uses the same firewall scripts as NoCatAuth to do the actual firewall manipulation. It installs these scripts to /usr/local/libexec/nocat/, making it simple to customize your firewall rules if you need to. With splashd running, any users whose traffic originates on InternalDevice will be captured and shown the splash page defined in nocat.conf. The default html files for the splash page are kept in /usr/local/share/nocat/htdocs/, but can be kept wherever you like by setting the DocumentRoot in nocat.conf.

Another possible alternative to NoCatAuth is Cheshire, a captive portal written completely in shell script. It is available at http://nocat.net/download/cheshire/. The goal of Cheshire is to provide the smallest possible captive portal, suitable for use with very tiny Linux installations. Without decent networking functions of its own, Cheshire needs a couple of helper apps to do the dirty work of actual networking. Notably, it needs the getpeername utility from NetPipes (http://freshmeat.net/projects/netpipes/). It also needs the faucet utility from the same package, or it can use the system's inetd if you have one installed.

Apart from this, standard system tools such as sed, awk, and cron are all you need. Cheshire works fine under the very lightweight ash shell. If you want to serve graphics on your splash page, and your gateway has a slow CPU, you will probably be happiest with a "real" web server rather than using Cheshire itself. I find that khttpd (the Kernel space http server available in Linux 2.4) works very well for this job, and is very tiny.

To install Cheshire, extract the archive into /usr/local/cheshire/. Edit the cheshire.conf file in this directory to your liking, and launch the script using faucet like this:

root@gateway:~# faucet 5280 --in --out --daemon /usr/local/cheshire/bin/grin

If you would rather not use faucet, you can run Cheshire out of your inetd. Add the port as a service in /etc/services by appending a line like this:

cheshire                5280/tcp

Add Cheshire itself to your /etc/inetd.conf with this line:

cheshire  stream  tcp  nowait  root  /usr/local/cheshire/bin/grin

Finally, you will probably want to boot your users out ever so often, to force them to see the splash page again. Use the system cron to accomplish this. I run it once a day at 4:00 in the morning. Put a line like this in the crontab for root:

0 4 * * *       /usr/local/cheshire/bin/grin -R

While Cheshire and NoCatSplash might not be as feature rich as NoCatAuth, their requirements are very simple. They can be ideal for situations where you simply want to give people an idea of whose network they are using, especially if the capabilities of your wireless gateway are limited.

    Previous Section Next Section
    Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Z]


         Main Menu
    Main Page
    Table of content
    Copyright
    Credits
    Foreword
    Preface
    Chapter 1. The Standards
    Chapter 2. Bluetooth and Mobile Data
    Chapter 3. Network Monitoring
    Chapter 4. Hardware Hacks
    Chapter 5. Do-It-Yourself Antennas
    Chapter 6. Long Distance Links
    Chapter 7. Wireless Security
    7.1 Hacks #86-100
    Hack 86 Making the Best of WEP
    Hack 87 Dispel the Myth of Wireless Security
    Hack 88 Cracking WEP with AirSnort: The Easy Way
    Hack 89 NoCatAuth Captive Portal
    Hack 90 NoCatSplash and Cheshire
    Hack 91 Squid Proxy over SSH
    Hack 92 SSH SOCKS 4 Proxy
    Hack 93 Forwarding Ports over SSH
    Hack 94 Quick Logins with SSH Client Keys
    Hack 95 'Turbo-Mode' SSH Logins
    Hack 96 OpenSSH on Windows Using Cygwin
    Hack 97 Location Support for Tunnels in OS X
    Hack 98 Using vtun over SSH
    Hack 99 Automatic vtund.conf Generator
    Hack 100 Tracking Wireless Users with arpwatch
    Appendix A. Deep Dish Parabolic Reflector Template
    Colophon
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele