I found a more generic way to set up my linux wireless router, after I moved over to Ubuntu...
Set up your wireless card how you want it, hostap/master mode is optional. I believe most distros have boot-time network configuration stored in /etc/network/interfaces (if not, consult your docs). Say if your card is wlan0, you would put:
#------
iface wlan0 inet static
name MyWirelessCard
address 192.168.0.1
netmask 255.255.255.0
broadcast 192.168.0.255
network 192.168.0.0
wireless_essid mywireless
wireless_key s:foobarsky1234 #s: is for string, use 5 or 13 characters
wireless_mode ad-hoc # use master instead of ad-hoc if you have hostap
wireless_channel 6
#-------
Sometimes I see different examples using an underscore "_" to seperate the wireless and the operator, and others with a dash "-". The underscores worked for me, but if it doesn't for you try the dashes. For example, line 7 would be "wireless-essid mywireless;".
Now, optionaly you set up DHCP. I use the dhcp3 debian package, and my dhcpd.conf is setup like this:
#-------
ddns-update-style none;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name servers 400.3.2.1 500.6.7.8;
option domain-name "mycomp.mydslam.myisp.com";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 7200;
max-lease-time 7200;
}
#-------
You must replace the bogus domain name servers and domain name I gave with the ones listed in your /etc/resolv.conf. This config will set up DHCP the give addresses from 192.168.0.100 to 192.168.0.200, so theoretically 100 or so computers can connect to your wireless. Should be enough.
Now, permanately deativate any other firewall software you have, and then install Firestarter. This is simply a "apt-get install firestarter" if you're running debian/ubuntu/etc. If your distro doesn't have a prepackaged version, see
http://firestarter.sourceforge.net for install package and instructions.
Now run (as root) /usr/sbin/firestarter. You'll either need to log in as root or use a X.org-aware sudo, such as "sux" or "gksudo".
Configure the firewall how you like...but when you go to Network Settings, select the proper "Internet connected network device" like eth0 or ppp0, and then the proper "Local network connected device" like wlan0. Then, check "Enable Internet connection sharing".
Do not check "Enable DHCP for the local network". If you do check it, Firestarter will overwrite your dhcpd.conf, probably breaking your setup, and producing wierd errors on startup. If you couldn't get dhcp to work, you could safely try this however...
Click apply, and you should be immediately be able to connect to the internet with your wireless computers. If not, make sure your dhcp service started correctly. For me, the Internet connection was flaky and cut out occasionally, but got better with time, so your results may vary at first.