How To Create A Wi-Fi Community

Class Description

From the early days of phone phreak conferences deep within the telephone system, to labs of scientists sharing research over ARPANET, to Wikipedia's user-generated archive of human knowledge, virtual spaces have enabled people from around the globe to form communities unfettered by geography and distance.

Now, with the proliferation of wi-fi, small ad-hoc home-brewed networks are flourishing. And with them, the opportunity for new types of location based virtual communities to flourish as well-- communities whose users share both a physical social space, like an apartment, cafe, or office, and an information space, like a community wiki, blog, message board, and Internet access.

The class will focus on leveraging several open source technologies to take advantage of this fertile new territory for community building. Each student will set up their own community intranet attached to a captive portal wi-fi access point using DD-WRT and PmWiki, which they will incorporate into their own community project.

A captive portal is like a home page for your network. Anyone who connects to your wireless and tries to browse the internet will be sent to your intranet's home page first, before being allowed to access the rest of the Internet.

Make them click a button and accept your terms of service; promote your organization, project, or underwriters; share your latest youtube rant or favorite lol cats; provide a feedback loop through a wiki or bulletin board.

This class is for beginner to advanced web monkeys and is designed as an introduction to several topics; networks, linux, wikis, routers & virtual communities. Knowledge of some or any of these items would be beneficial but is not necessary. Familiarity with computers and an eagerness to learn are a must.

Requirments

  • A DD-WRT compatible router. One will be provided to each student and is included in the price of the class.
  • Webspace. Students are asked to provide their own webspace to permanently host their wikis, but sandbox space will be provided for the duration of the class to students who do not have access to their own web host.
  • A laptop computer running Windows, Mac OS X, or Linux with a wi-fi card and ethernet port.

Syllabus

Part A: internetz

  • Internet lore & infrastructure
  • Overview of network topology, hardware, & software

Part B: h4x0rZ

  • Basic Unix
  • Install DD-WRT onto router

Part C: Meeting people is easy

  • Install pmwiki
  • Configure pmwiki
  • Configure nocatsplash
  • How to use pmwiki
  • Work on individual projects

Lecture

Google Docs Presentation

Form code for nocat authentication

<form method="POST" action="$action"> <input type="hidden" name="mode_login"> <input type="hidden" name="redirect" value="$redirect"> <input type="hidden" name="accept_terms" value="yes"> <input type="submit" value="Login/Enter"> </form>

Sample settings for nocat

Links

DDWRT

PMWIKI

NOCAT

Networking

Discussion

add comment

Please add your questions / comments to the class here. Password to edit is guest.

From Davis: Remote Management & Bandwidth Throttling

Thanks again for hosting the class, Ryan. I learned a lot, and have many questions (which is good). First to start, does dd-wrt come with a remote management tool, one that could help me throttle bandwidth, view usage, etc, like Meraki's dashboard?

--davis.

Response:

OK, there are several parts to this, but the short answer is yes, it does.

Part A: Remote Management & Monitoring Usage

Go to the router's web interface. Then click Administration > Management. You'll see under the remote access section that you can enable connecting to the router via HTTP (web interface) or SSH (Secure SHell) from the WWW. Click on the more link in the help menu to learn more about this. You'll need to enable SSH in the services tab, if that's how you'd like to connect, and you may need to setup DDNS & NAT depending on where you're trying to access it from and where the router is in your network. See my response to Lucas' question about hosting services to learn more about NAT.

Now that you can get to your routers administrative pages from anywhere in the world, go ahead and look at its many tabs filled with various bits of usage information.

Example: Administration > Log will show you the router's current system log. Status > Router will give you statistics on the routers hardware usage, i.e. processing load, memory usage, uptime, etc. Status > LAN & Status > Wireless will tell you information about your network and how many users are connected. Status > SysInfo breaks down a lot of this same information on a single page for quick digestion.

I understand from the DD-WRT site (it's a few posts down from 9-19-07) that there is a new graphical bandwidth monitor, its only available as of their v.24 RC3 release though, which probably works fine, but is a development release and has not been designated "stable". We installed the most recent stable release v.23_sp2. Keep checking the DD-WRT site for news on new stable firmware releases. Or, go ahead and read up on v24 and update your firmware. The release is only un-stable in that it may have unknown bugs, but it represents the most recent working version of the software that the developers are using, and should work fine for the most part.

Part B: Throttling Bandwidth

Go to the router's web interface. Then click Applications & Gaming > QoS. QoS stand for Quality of Service. This page sets all the options for determining how your router treats each packet of data it deals with. It can do what's known as throttling, or limiting the amount of resources the router allocates to its clients, i.e. you could tell it to only function at the speed of a dial-up modem, so your wireless users don't suck up all your bandwidth. It can also designate certain types of traffic as high or low priority i.e. video chat or VoIP over bulk mail and HTTP, ditto with blocks of IP addresses in your network, specific computers identified by their MAC address (that's MAC, as in Media Access Control address, not Apple), and the ethernet port the traffic originated from.

~Ryan

From Lucas: Question about hosting your own services

I know it's early to already have questions, but you might be able to help sort the theory behind what I'm trying to do. I'm not sure if you're familiar with Max/MSP, but I'm trying to get it to communicate over the internet. There is an standard object called a maxhole that allows you to send data to another maxhole within a LAN (all you need is a port and an IP address).

There are a couple options to send information on the internet outside of the LAN. They are using TCP or UDP with netsend and net receive. Here's my question:

Do you have to send the packets through a internet IP address? If so, how do I direct the packet from my machine through an internet address and out to another machine at another geographic location? Is there a simpler way to get a direct link between the two separate locations?

PS- I found this note in one of the Max/MSP patches I was looking at: To set up a hostname for your machine even if you don't have a static IP (i.e. DHCP setting) have a look at the services provided at http://www.dyndns.org/

Does this problem require a static IP address and is DYNDNS needed for this?

Thanks for your help and for hosting the class. It was motivational

Response

OK, there are two parts to this: Part 1 get traffic from the WWW to your outside IP. Part 2 get traffic from your outside IP to an address on your internal network.

Here's a diagram:

First, getting the traffic from the WWW to your outside IP. If your ISP gives you a dynamic IP address that changes frequently you may want to setup DYNDNS to map a Domain Name to your IP address, so you won't have to constantly change IP address values in your code. Instead you can have something like myhost.mydomainname.com.

For testing purposes though, your IP address is probably not changing often enough for that to be necessary. EX. They may change it once a week or once a month, and when they do you can change that IP value in your MAX code.

However, if you want everything to be more finalized setting up DYNDNS is very simple and you have several options.

Their Free Dynamic DNS Service (http://www.dyndns.com/services/dns/dyndns/) allows you to setup a domain like http://lucas.dyndns.com and have that name point to your network's outside IP. The caveat here is that you only get to choose a sub-domain off a list of domain names they already own. Here's the list: http://www.dyndns.com/services/dns/dyndns/domains.html

That may be fine for you, but if you want something more personalized that works off a domain name you already own, then check out their Custom DNS solution (http://www.dyndns.com/services/dns/custom/). This gives you full control of your own DNS, so you can setup as many subdomains at your own domain name as you want. Each of those subdomains can point to an IP that is dynamically changing.

Once you've setup either type of account with DYNDNS go to your router's web interface. Click Setup > DDNS. Select DYNDNS from the pulldown menu (the other options on that list are also viable Dynamic DNS service providers). Fill in your username, password, and the domain name you want this router to be updating the IP for e.g. lucas.yourdomain.com. Set the type to dynamic or custom (whichever you decided to use from above). Then save.

It should provide some feedback information about whether or not it updated, but you can also check your DYNDNS account page and see what the IP address is listed as.

If you encounter problems with that, check the help pages on DYNDNS and the help pages in the router interface and go over everything again. Make sure you filled out all the values correctly and have setup your DNS properly.

Now Part 2, you'll need to redirect traffic from your outside IP to an address on your internal network. That's accomplished through a process called Network Address Translation or NAT. You have to setup NAT on each router that the data needs to pass through to get to its final destination.

For example, if your server is connected to your DDWRT router, and DDWRT is connected to the router provided by your ISP, you'll need to configure the NAT on both DDWRT & your ISPs router.

Note, that sometimes your ISP just gives you a modem, this is not the same as a router, and if that's the case you don't have to do mess with any NAT settings on it. If however, as is common now, they give you a router/modem combo box, then you will have to mess with the NAT.

First, to setup NAT in DDWRT, go to the web interface. Click Application & Gaming > Port Forwarding. Click the Add button at the bottom to generate a new set of fields. Click the more link in the help on the right and read about all the values.

Basically, what your telling the router here is, take any traffic that enters the router at port A and send it to some IP address at port B. The IP address is the machine that's running the service you want traffic directed at. Port A & Port B can be the same port, but don't have to be. If your not sure what a port is, read up on it here:

http://en.wikipedia.org/wiki/TCP_and_UDP_port.

Basically, its a way of dividing your web traffic up into specific services. So for example, HTTP (web page) traffic travels on port 80, FTP traffic travels on port 21, and SSH travels on port 22.

If you have a second (or third or fourth!) router your need to do NAT on this process is much the same. Direct the traffic from router A to the IP and port of router B. Repeat as necessary. Your other routers are going to have their own interfaces which will differ from DDWRT, but usually NAT settings are part of the firewall or part of some applications menu, so poke around and see what you can find. The setting fields should be similar.

Remember to test as you go with this stuff. Your putting together something complicated and it probably won't all work the first try, so break it apart into pieces, and test each step along the way.

Hope this will get you going,

Ryan

From Peet, I like your ideas, and want to implement my own. I want to know how I can setup nocat or wifidog to have an open captive portal on a virtual wireless network that routes to a local server using dd-wrt. I intend to setup a wiki and fileserver in the housing complex that I live in.. for anyone to use. But I do not want to share my expensive Canadian internet connection. Can anyone tell me how to do this? Thanks -peet