half of a captive portal
September 8, 2006 9:43 PM   RSS feed for this thread Subscribe

I want "half" of a captive portal. Basically, I want something that would take any http requests and return a sign webpage. I don't need any authentication or routing to take place. Any suggestions?

I'm thinking this could probably be done with just Apache on a linux box. Can Apache be configured to send a single HTML page no matter what the request?

This isn't going to be an internet connection, just a wireless network not connected to the world. Any user who connects to the network would have this single HTML page returned. Period.

Any help would be appreciated!
posted by MiG to computers & internet (6 comments total)
You could just have your special page be the 404 page, and not put anything in the root directory.
posted by bshort at 9:48 PM on September 8, 2006


Or you could use mod_rewrite to rewrite any request to the page you want to serve.

(You could also try lighttpd. Its config files can be somewhat less scary than apache, but it's probably not worth it for something this small - there are more/better docs on apache.)
posted by heresiarch at 10:02 PM on September 8, 2006


Um. You want something at a lower level, I think. Why not just use a ipf/ipchains/ipfw/etc rule?
posted by devilsbrigade at 10:18 PM on September 8, 2006


Actually, you need a combination of what's been suggested here.

1) Set the network's DHCP server so that, when people connect, their default gateway is the linux box's IP.

2) On the linux box, set a firewall rule saying "all INBOUND traffic TO all addesses PORT 80, redirect to localhost port 80.

3) Have Apache listening on port 80. Set up a website with the main "index.html" page as the page you want them to see. Set your 404 page for the site to be that same page.

That should do it.
posted by CrayDrygu at 9:45 PM on September 9, 2006


Thanks CrayDrygu, that should do it.
posted by MiG at 10:08 PM on September 9, 2006


I think probably having the DHCP server give out the linux box's IP as the DNS server would help too. It could basically return the linux box's address for any DNS request?
posted by MiG at 10:16 PM on September 9, 2006


« Older Yet another mixtape thread: L...   |   Why don't Halal meat shops pri... Newer »
This thread is closed to new comments.


Related Questions
Charming road warrior seeks smart and sassy net... October 27, 2006
simple wireless network August 15, 2006
What firewall protection do I need with my Linksys... September 27, 2005
Firewall Questions February 7, 2005
Wireless network Security October 25, 2004