Providing a Whitelisted Wireless Hotspot?
Ploxis writes "I volunteer some of my day managing a small network (and a ragtag band of computers) for a local nonprofit. I have been asked to set up a second, open, independent wireless network on site that will provide cost-free broadband Internet access to patrons. The catch is that they want to provide access only to a select group of about 25 websites while disallowing everything else. No objectionable sites, no mundane but non-relevant sites such as online banking or YouTube, and no other activities such as P2P or IM. They only want HTTP and HTTPS activity from a set of whitelisted websites." For the rest of Ploxis's question and his intial thoughts on making this happen, read on below.
"They'd also like any non-whitelisted URL to be redirected to a 'splash page,' which would just be some HTML providing a list of allowed sites by category. I'd host this page internally on the network.
Their primary concerns are liability for access of illegal/objectionable materials and conserving their bandwidth, while still providing access to specific relevant tools online.
My initial thought was simply an open wireless router, a set of remarkably restrictive firewall rules, and an in-house server as a custom DNS ... but that's pretty shaky (i.e. anyone specifying their own DNS can still get at whatever they want). I assume they'll need a router with some pretty significant traffic management capabilities as well, but that's not something I've investigated before.
Anyone's experiences, recommendations, case studies, or maps of similar networks would be greatly appreciated."
and turn it into a router and make a domain for those folks?
Configure a linux box as a router, put squid on it, set up your whitelist, and you're all set.
Sounds like something that pfSense might be able to do, between squid and maybe the captive portal.
mod_proxy, mod_rewrite
your friends at apache have most of the work done for you. All you have to do is slap it together and write some custom rules.
Linux as a firewall, to make sure that all http/http traffic gets redirected through the proxy
if the hostname in the url doesn't match what's in your rewrite rules (aka, to pass through) then rewrite it to your custom splash page.
no need for wacky dns tricks here.
Support FSF: Stop thinking with your wallet, and think with your imagination. (cc/non-commercial)
Is it hyper-critical that a visitor can only see one of 25 websites, or can you tolerate the idea that maybe one or two users can type in an IP? If you can't live with someone visiting an unapproved site if they're determined and resourceful enough to get around your restrictions, then scrap the whole damn project because you'll be playing whack-a-mole the whole time.
Put another way: you're on a nonprofit's budget. Is this the best way to spend its resources, or would you be better off tolerating the occasional unintended use?
Dewey, what part of this looks like authorities should be involved?
Tell them no and strike a blow for Net Neutrality!
M
Untangle's pro version should allow this. Maybe they have a discount for non-profits?
You need a web proxy and a DNS proxy: The web proxy to restrict the URLs to those which are whitelisted and the DNS proxy to stop "clever" people from tunneling through DNS.
Instead of squid, use tinyproxy. You're not primarily interested in caching, you're interested in access control. Tinyproxy gives you much finer control of that, and it's also ... well ... tiny.
Just set up a "no proxy" rule for the sites you want them to get to, and redirect everything else to a 404 server.
Of the allowed sites.
Use any commercial router and access point, or even a WRT-54G. Drop the list of allowed ips into an access list
Deny traffic for all other ips.
Use separate rules to deny traffic to ports other than 80 and 443
Just using a firewall; nice idea. You'd have to keep on top of DNS lookups though.
The router I got from my ISP actually allows you to do this by default. It also lets you redirect to another page, which would allow an error message to be displayed. Can you think of a way to do this with kit available in normal routers?
All intents and purposes. Not intensive purposes.
OpenDNS were talking about adding this as a pay-for service, which would be cheaper and easier than setting up a dedicated Linux box, which is the normal proposed solution to any problem posed to Slashdot.
Incidentally, the thread I linked has some other solutions posted in it.
All intents and purposes. Not intensive purposes.
China, for example...
Sorry... couldn't help but troll.
Grab a wrt54gl, install openwrt, and configure.
You can host your "splash" page, as well as your whitelist.
Done and done.
I would suggest a linksys-WRT54GL/Buffalo/Asus/etc. wifi router running OpenWRT. If you're only allowing to a relative handful of sites (~25), iptables rules wouldn't be too cumbersome. Add on a captive portal package (wifidog, nocat, etc.) and you're good. Though the basic captive portal redirection could be handled simply with iptables too, but one of the packages could make things easier to administer/monitor. I know that wifidog uses libhttpd as a web server that runs on the router, so you could run the captive page on the router rather than using an internal web server for it and opening up a hole into the network you probably don't want that accessible from the wifi.
Going the route suggested by others of putting squid (which can offer the added benefit of caching thus taking a bit of the load off the ISP bandwidth usage) and linux on pretty much any old PC is certainly another option. There are several firewall distros that would make this fairly simple. However in this case, you would need to add a wireless card to the box or use an AP. If you don't already have these laying around, then from the cost perspective a router that can be flashed with OpenWRT, DD-WRT, etc. would make more sense.
Maybe I'm missing something, but how would one use DNS to get around iptables rules which only allow packets to specified IP addresses? If there's a concern then I suppose using something like dnsmasq and only allowing the firewall to contact external (or internal even) DNS servers is possible. IOW, don't allow DNS queries from clients to pass the firewall.
BTW/Disclaimer/what-have-you, I do development work (router firmware) for an ad-based free hotspot company.
Of course I didn't RTFA... why would I do that? You really are new here aren't you? Don't let my UID fool you.
Whatever you do, make sure you whitelist any dependencies these 25 websites use. I'm thinking of things like google-analytics, any kind of javascript library that is third-party hosted (Google Code or YUI) and ad code here. If you whitelist those as well, your patrons browsers might act a little funky depending on your solution.
Mikrotik will do everything you need and more.
You would need build your own using a RB/411A, CA/411, R52H, AC/SWI and a 12-24volt power supply and you would be all set.
http://www.mikrotik.com/
http://forum.mikrotik.com/
The guys over at http://www.quicklinkwireless.com/ sell preassembled AP's and will even walk you through configuring it.
There's no need for domains. The firewall just has to forward any non-approved IPs to their "non-approved hosts" page. Easy as pie, and (while non-trivial) not worth our time.
After all, I am strangely colored.
Setup a transparent proxy and use dansguardian. I've set this up and had it running for several months. It *easily* supports whitelited/blacklisted sites, domains (using regular expressions even), and mime types. It can also block objectionable content based on keyword groups and ratings etc. Very good indeed.
I have used ddwrt and they have tons of features... deny all and allow only certain websites....would not cost too much to setup....
set up a proxy on your network, most proxies can strictly restrict the list of allowed sites fairly easilly and you should be able to set up such a splash page.
put a second network card in the proxy to connect the wireless access point to. Use iptables DNAT to force all http traffic to the proxy.
for https I would just use iptables rules to filter and then SNAT the traffic.
They won't get a splash page for https requests but few people manually type https addresses in my experiance so this shouldn't be too much of a problem.
I have a router that does that. Provides for up to 40 white-listed URLs, and only those. Dual firewalls, all the latest, even QoS (not that it matters). $100 @ Newegg. D-Link DIR-655.
Does not provide a bounce page, that I'm aware of.
And over there we have the labyrinth guards. One always lies, one always tells the truth, and one stabs people who ask t
DD-WRT will allow you to do this using their "hotspot" option. You set a list of sites that are allowed without logging in then when they try to go to other sites it brings up the "login" page. You can customize that page to whatever you want.
Simplest, quickest way to do it, and does everything you're looking to do.
They put a relatively decent shell interface on top of linux that hides a lot of the complexity, and also have a good GUI management utility (I don't use it myself, but it can do everything the shell can).
It'll run on most hardware, including x86. You'd have to buy a license, $45, but it's worth the time saved figuring out how to get all the different parts tied in together.
And there is an active community forum with helpful people in case you run in to trouble.
Among all the other ideas, you should also consider forcing all DNS queries to a service like OpenDNS.org where you can easily maintain a whitelist and blacklist the rest of the internet.
I would expect a simple shell script on a workstation or laptop should be able to assist with maintaining the ip list; or make a Linux virtual machine/put it on the cloud, and only ever run the VM while updating the list. It would be sensible to use a script and format the output so it can be pasted into the device to perform updates according to any DNS change.
It is fairly commonplace to have script-generated firewall configurations like this. Esp. when a single site has several firewalls (I.e. for backup internet links); it is beneficial, for example, for attacker blacklist bad ips to be synced, and often this would be done using a database at a management point.
It bears mentioning that Cisco871W ISRs and other similar models, if the proper features are licensed can do straight URL blocking, though configuration may be challenging. URL filtering on those devices is meant to be provided by a third-party vendor, however there is reportedly a way to allow some URLs and default-deny everything else.
(You manually enter exclusive allowed domains, configure no filtering vendors, and turn off allow mode)
The 871W router+AP combos are approximately $400. This is not inexpensive, but is still a bit cheaper than buying and dedicating a full-blown server just to do filtering while also requiring a separate unit for the AP, especially when it comes to noise pollution and power consumption over time (and ongoing costs of electricity, UPS capacity (since all servers need an UPS or will potentially have a short life), and higher probability of PC failure anyways [mechanical disk drives fail predictably after a few years, _Especially_ when used for years in disk-intensive I/O-hungry apps like a squid cache]).