Hardware Requirements
As you probably guessed by now, my frugal friend constantly inundated me with mantras of "Save me money" when building the hotspot. To run the m0n0wall software, I needed a PC. This PC running m0n0wall acts as a policeman, making sure a hotspot user has authenticated. The policeman analogy is further appropriate considering m0n0wall has some pretty sophisticated firewall features (beyond the scope of this article) that allow for the owner to even restrict what web sites patrons can and cannot visit. Fortunately for my friend, the PC that I needed was fairly low-powered (translated for him—low cost). The m0n0wall documentation points out that a 486 or higher processor (any Pentium PC will do) is sufficient to run m0n0wall for most deployments. You can opt to run m0n0wall off a hard drive, but because I wanted to keep costs down, I decided to run m0n0wall off a CD-ROM and used a floppy drive to store m0n0wall's configuration data. That's right—you can run m0n0wall without a hard drive!
The amount of RAM required is listed at only 64MB. Considering that today's modern-day PCs usually have about 512MB, the memory requirement for m0n0wall was also pretty slim. I picked up the PC I needed for my friend at a vintage PC shop for $35.
The m0n0wall PC needs to have two network cards (otherwise known as NIC cards). Because the PC already had one built in, I just had to add one, which I picked up for $10 at my favorite PC accessories store. Virtually any modern-day NIC card will do, as m0n0wall has built-in driver support that recognizes most popular NICs available at the local electronics store.
Another thing I did have to pick up for the hotspot setup was an additional wireless router. My friend already had one, but I needed another so that my friend could wirelessly connect his shop's PCs to a router whose wireless connection is encrypted, while the captive portal's router would remain unencrypted but protected by m0n0wall.
The second router isn't going to be used as a router but, as you'll see, we'll cripple its functionality and use it only as an access point. Oddly enough, in my experience I can buy wireless routers for cheaper than access points, so I decided to use a wireless router and configure it as an access point.
The setup I implemented is shown in Figure 1.
Figure 1 The m0n0wall setup.
You need to configure your Wireless Router #2 as an access point. Also, you need to turn off the router's built-in DHCP server because the m0n0wall box acts as a DHCP server. How to turn off the DHCP server will vary from wireless router to wireless router. I suggest you check out your product manual to find out how to do it for your particular router. Give your second router a service set identifier (SSID) something like "HOTSPOT" so your customer's can readily recognize is as a hotspot. Also, turn off wireless encryption on the second router. You want your hotspot patrons to be able to connect without the tribulations of entering a WEP key!
In my setup, I had the first router acting as a DHCP server. Accordingly, the m0n0wall server is granted an IP address by the first router. It uses this IP address to make connections to the outside world, via the first router.