Let’s talk wireless networking

When I was at church tonight looking at a power supply they asked me to help them set up a wireless network. I didn’t go about securing it just yet because I was paranoid about locking myself out.
I learned enough anyway.

The first thing I learned was that mix-and-matching your stuff for initial setup isn’t the best of ideas. We had a 3Com access point, a D-Link PCMCIA NIC, and a Linksys USB NIC. The D-Link and the 3Com didn’t want to talk to each other. Differing SSIDs turned out to be the culprit. The 3Com’s SSID was “3Com”. The D-Link’s SSID was “default”. The Linksys’ SSID was “Linksys”. But the Linksys setup program hinted that if you changed the SSID to “Any”, it would work with anything. It was right. It linked right up to the 3Com access point, while the D-Link just kept blinking away, looking for something. So we used the Linksys to configure the 3Com access point and changed the D-Link’s SSID. We had to reboot a couple of times before it kicked in, but then the D-Link connected up and held a link.

So the moral of that story is to make sure your access point and at least one of your cards match. And if you can’t match brands, get one Linksys, since you can set its SSID to “Any” and it’ll connect to anything. (I couldn’t figure out how to make the D-Link do that; maybe if I’d set it to “Any” it would have found the 3Com too.) Of course the only way to find out the 3Com’s SSID was to connect to it, so if we hadn’t had that Linksys, we’d have been up a creek.

So now I just have to figure out how to secure the network and they’ll be set. The plan is to only break the wireless stuff out during events, so it’s not like they’ll become much of a wardriving target, but I’ll still feel better if it’s secure. I’m a little bit afraid to just connect to the access point, enter a passphrase and turn on 128-bit encryption, because I couldn’t figure out how to give the cards themselves the passphrase and I didn’t want to take the chance of whether it’ll ask for it upon initial connection.

Time for more research.

And I think I’ll be getting some wireless stuff for myself soon. I’ve thought about phone networking, but Linux support is spotty. Wireless is less secure and more expensive, but it’s a whole lot easier. And it’ll be nice to be able to take a laptop anywhere I want and still be connected. CompUSA has their wireless gear on sale right now.

That Middle East oil rumor

You’ve probably seen the e-mail circulating around about what companies buy Middle Eastern oil and thus could be indirectly funding terrorism.
That e-mail came up in conversation today, and then I remembered the Truth or Fiction Web site, which I’d stumbled across while researching the story of Butch and Eddie O’Hare. When I’d first seen that e-mail, I went to the Department of Energy web site to see if I could, as it said, “easily document” who was buying oil from countries that don’t like us very much. I didn’t find anything.

They did. And the e-mail rumor, based on their research, has the numbers wrong but is mostly correct about which companies are buying oil from the Middle East and which ones aren’t, even if it was wrong about the number of barrels (and sometimes they were off by a factor of 10).

The question is, will it do any good? Economic boycotts have worked in the past–take a look at the early days of the Civil Rights movement for an example–but you have to really want it, want it enough to stick to your guns. Based on the rumor, I bought all my gas at Phillips 66 for months, figuring I probably wasn’t doing any harm and might be doing some good. But my last couple of tanks have come from the Mobil station that’s on my way to work. There are a couple of Phillips stations not far out of my way, but they are out of my way.

That’s pretty typical. These days, we’ll talk tough, and we’ll even act tough for a while. But more often than not, ultimately what wins out is what’s cheap or convenient. That Mobil station is close and on the way, so it couldn’t be any more convenient, and it always seems like it’s the first station to lower its prices and the last to raise them. So I’ve been buying there.

I probably should start driving that extra mile to buy somewhere else. There’s a Citgo close by too.

Oh, and by the way… Next time someone forwards you that Pepsi can Pledge of Allegiance rumor, tell them to stop circulating it. It was Dr Pepper, not Pepsi. I can’t say anything with my dollars there. I don’t know that I’ve bought anything from either company in the past year because I almost never drink soda.

A moving story

My mom came in and helped me move this weekend. Moving is a pain, which is why I do it as little as possible. I’m hardly a neat freak, as any of my coworkers can attest to, which makes it harder.
But Mom told me a story.

Not long after she met my Dad, she helped him move. She came over to his apartment, and he handed her two boxes. One was a small box, slightly bigger than a shoebox. The other was a really big box. She pointed over to the box my 19″ monitor came in, and said the box he handed her was bigger than that one.

“Put the clean dishes in the small box, and the dirty dishes in the big box,” he told her.

She opened the cabinet and found a couple of dishes. She put them in the small box. She found a few dirty dishes in the sink.

“But there aren’t that many dirty dishes,” she said.

“Hold on,” he said. He opened the dishwasher. It was bursting. Then he walked over and opened up the oven. More dirty dishes. “And I think there are some in here too,” he said, opening up the freezer. There were.

“David, your dad was a slob,” Mom said.

Suddenly I don’t feel so bad about those times I waited until all my dishes were dirty before I washed them. I’ve never had to resort to putting dirty dishes in the oven and freezer.

Adding a network card to Linux

I said yesterday I didn’t remember exactly how to add a network card to Linux machines. I found instructions today. They weren’t entirely correct. So here are instructions (hopefully more correct–I have access to exactly one Linux box right now) for adding a NIC in Linux.
First, determine which module your NIC uses, then install it temporarily with the following:

insmod [module name]

For example:

insmod rtl8139

In RPM-based distributions (Red Hat, Mandrake, Caldera, TurboLinux, UnitedLinux), edit the file /etc/modules.conf or /etc/conf.modules to add an alias for the module. In Debian-based distributions, edit the file /etc/modutils/aliases and then run the command update-modules. In any case, the format of the line to add is the same:

alias eth0 rtl8139

More likely, you’re adding a second NIC, in which case the line would look more like this:

alias eth1 rtl8139

In RPM distros, next you create an interface config file in /etc/sysconfig/network-scripts. The file is called ifcfg-[interface]. Here are a couple of example ifcfg-eth0 files:

# Static IP
DEVICE=eth0
IPADDR=192.168.0.33
NETMASK=255.255.255.0
BROADCAST=255.255.255.255
ONBOOT=yes

# DHCP
DEVICE=eth0
BOOTPROT=dhcp
ONBOOT=yes

In Debian, all network configuration info is kept in /etc/network/interfaces. Here’s a sample configuration:

iface eth0 inet dhcp

iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

SuSE is likely to be a bit different. Slackware is virtually guaranteed to be different. I haven’t looked at SuSE in three years and Slackware in five. Hopefully they’re similar enough that this can give you a start.

I’m sure there’s a graphical way to do this in some, if not all distributions, but I prefer to hit the configuration files directly. It’s much easier to explain, and the knowledge is much more portable.

A semi-easy firewall

A single-floppy firewall mini-distribution can be a quick and easy way to save yourself some money if you’ve got an old PC in a closet not doing anything, assuming you stumble across a combination of hardware that works right.
If you don’t stumble across a combination of hardware that works together, you can just as easily spend a weekend and accomplish nothing but uttering strings of four-letter words in combinations never before heard by mankind.

In case you came here looking for hardware that works, here are a few hints. A 10-megabit PCI NE2000 clone in combination with virtually any 10/100 PCI card ought to work fabulously. A pair of 10/100 PCI cards based on the RealTek 8139 chipset, which includes the majority of today’s inexpensive cards, probably will not. If you’re buying new stuff and want ease of use, get a 3Com card and a cheapie. If you want cheap and a little inconvenience, get a Netgear FA311 or 312 and a Realtek 8139-based card, such as a D-Link DFE-530+ or a Linksys. You’ll have to hunt down and install the natsemi.o module to get the Netgear working; most other inexpensive cards on the market will work with the rtl8139.o driver.

Freesco doesn’t supply a driver for the Intel EtherExpress Pro series out of the box. If you’ve got an EEpro, you can make it work by downloading the module and copying it to the floppy, but don’t rush out to buy one. And yes, the 3Com and Intel chipsets are high-performance chipsets, especially compared to the 8139, but remember, routers are machines that pull packets out of a 1.5-megabit pipe (if you’re lucky) and shove packets down an even smaller pipe. In this application, a $40 big-brand card doesn’t give you any advantage over a no-name card that costs $6 at Newegg.com

While these firewalls will technically work fine even on a 386sx/16, trying to make them work with ISA cards can be a long, difficult road. Used Pentium-75s are dirt cheap (and Pentium-60s and 66s are even cheaper, when you can find them) and they’re a lot less trouble because PCI cards don’t require you to rejumper them or hunt down a plug-and-play configuration disk to find out its IRQ and address. I’ve had the best luck with Pentiums that used an Intel Triton chipset or newer (the 430FX, HX, VX, or TX). I’ve tried a couple of boards that had a SiS chipset of 1995 vintage or so, and I could get one network card or the other working, but not both. I don’t want to generalize and say that based on two isolated incidents that all Taiwanese chipsets are junk for this application–for all I know, the problem could have been the BIOS on those boards–but I’ve done this on a handful of Triton-series boards and done well on all of them, and on two SiS boards and failed. Your mileage will probably vary.

How much memory do you need? 16 megs is sheer luxury.

Once you put all this together, the question becomes whether you use a floppy distribution or a full-blown distribution. If you want peace and quiet and cheap, the answer is pretty easy–use a floppy and pull out whatever hard drive was in there.

A full-out distribution like Red Hat or Debian will give you more versatility. You can run meaningful Web and FTP servers if you want (and your ISP allows it). You can run a caching nameserver to speed up your Web browsing. If you feel adventurous, you can even install the Squid caching proxy and speed up your browsing even more (but either use a SCSI drive or put in a bunch of extra memory and run Squid’s cache out of a ramdisk–Squid’s performance on IDE is, to put it mildly, terrible).

I’m having a hard time finding the documentation on how to set up a second network interface quickly. I believe it involves the file /etc/interfaces and the files /etc/sysconfig/ifconfig.eth0 and .eth1, but I don’t have a Linux box handy to investigate at the moment.

Anyway, I like Debian for this application (of course) because I can easily fit a minimal Debian on a 100-meg hard drive.

Once you get your network cards all working and talking to each other, you can build your firewall using this online tool. I just copy it, then Telnet into my Linux box using PuTTY, fire up a text editor, and right-click in the window to paste.

If you want versatility and quiet and don’t mind spending some cash, pick up a CompactFlash-to-IDE adapter and a CompactFlash card of suitable size. Don’t create a swapfile on the CF card–you’ll quickly burn it up that way. Your system will recognize it as a small IDE drive, giving you silent and reliable solid-state storage on the cheap.

Phoenix hits 3, er, 0.3

I think I have a new most favoritest Web browser of all time for Windows. Or I will soon.
Phoenix is Mozilla on a diet. The idea is to cut out all the stuff not related strictly to Web browsing in order to make it as small and fast as possible.

Early releases were slightly faster than Mozilla. But the Mozilla feature I use most was missing: The ability to right-click on an image and select “Block images from this server.” It’s a good way to block objectionable content, be it an especially annoying ad (though most ads are tolerable if I keep animation turned off, I’ve found) or anything else I don’t want to look at.

Version 0.3 brought that feature back and nearly halved the memory consumption. It’s still not as slim and fast as Galeon on Linux, but it’s getting there. The last time I tried using a Mozilla theme to change its appearance (I like the TinyMozilla theme because it lets me use my screen space to display Web pages at the expense of big buttons–since I don’t need big buttons, that’s a good thing) I crashed it. But I can live without my fave theme for a while.

The nice thing is we’ve got a reasonable-sized Web browser that incorporates popup blocking without having to run additional programs. You can easily chew up 4, 8, 12 megs of RAM by keeping a popup blocker running. That’s the amount of memory a Web browser all by itself should be using.

Check it out. It’ll keep getting smaller, faster, better.

Telemarketers, go away

I spent the night fighting off telemarketers. I lost count of how many calls I got. It might have been as low as three. It seemed like a lot more though. Two different companies wanted to sell me alarm systems. Well, right now I can’t really afford an alarm system.
I thought about getting caller ID, or call-block on anonymous calls, but that’s like $7 a month. That’s not a lot, but I think I’m paying $20 a month for basic phone service (I called the phone company and told them I wanted two things: a dial tone and DSL. Nothing else.) so raising my phone bill by 33% to avoid telemarketers doesn’t quite seem right. I’m better off stashing that $7 a month into a repairs fund.

Then I remembered that at the apartment I got about five telemarketing calls a month. Missouri has a pretty liberal no-call law that eliminates most telemarketing calls to those who put themselves on a list. I signed up months ago, when it was first offered, and then I forgot about it. I just enjoyed not getting the telemarketing calls my friends always complain about. Those I do get usually are during the day, so my answering machine gets them. You can report the infringements and Missouri will go after them, but I’ve never bothered.

So, in between calls, I went and put my name on the no-call list.

I’ll have peace and quiet soon.

Switched off

In response to Apple, Microsoft started its own “Switch” campaign featuring a freelance writer who ditched a Mac for a PC that runs Windows.
Well, the Associated Press tracked down this freelance writer and found she was a Microsoft PR hack. She said she really did switch. But Microsoft pulled the ad.

The AP tracked her down from the personal metadata Microsoft puts in all Office documents.

Can’t you just see the Apple “Switch” response now?

“Hi. I’m a CIA spy. I got rid of my insecure PC and switched to a Macintosh.”

I always thought the “Switch” campaign was really dumn, but suddenly Microsoft seems to have made it interesting.

Self publishing to success

There was a thread on Slashdot on Friday about self-publishing, the result of a review of a self-published novel. I found it pretty interesting.
People complained about the price of the book. I looked at Xlibris’ pricing. Had they published Optimizing Windows, it would have sold for about $4 less than it did.

People talked about self-publishing as a sign of poor quality. Unfortunately, anything is a sign of poor quality. If it’s published by a publishing house, marketing is paramount, rather than quality. Don’t listen to the publishers who claim they think about quality and nothing else. It’s a lie. Some publishers are worse than others. There are a lot of publishers I just won’t buy a book from, period. There are a lot of authors I won’t buy a book from, period. (And don’t bother trying to give their books to me either; I don’t want the other books on my bookshelves to look bad by association.)

The author of the book complained about Xlibris’ pricing being designed to make money off the author rather than the readers. That’s true of every self-publishing company. To a degree that’s true of the big publishing houses too. The terms of places like iUniverse and Wildside may be more favorable.

The author of the book complained that he made $2 per copy of the book. If I remember right, my royalties for Optimizing Windows, had everything gone well, would have worked out to about $1.75 per copy. And that’s actually not bad. Some of the authors of Dummies books make 25 cents per copy. The hope is that they can make it up in volume. Sometimes that happens and sometimes it doesn’t. If your name is Andy Rathbone and your book is titled Windows [whatever] for Dummies, you’re going to sell a million copies so even if you only get 25 cents per book it’s worth your while to do it. Though I’m pretty sure Andy Rathbone gets better terms than that.

While Optimizing Windows didn’t sell terribly well, it outsold some of the Dummies books, including some written by authors who were more established than me.

There’s a misconception out there that writers are rich. Writing books isn’t like big-league baseball, where the minimum salary is more than $200,000 and you get a minimum of three months off (and that’s assuming you’re a pitcher or a catcher and went to the World Series). You get an advance and you write your manuscript. Hopefully the advance is enough to pay your bills while you write, or you have money from somewhere else. The advance is taxable income. You’re self-employed. So the government’s going to take half of it. Some creative financing and tax planning can soften that blow a little.

Authors pay that advance back in the form of deferred royalties. Once a book sells enough copies that royalties cover the advance, the author starts getting checks every quarter. But when you pay $25 for a book, the author’s getting a small percentage of it. It might be as low as 25 cents. If it’s five bucks, that’s really high. Paper isn’t cheap and presses aren’t cheap, so most of what you’re paying for is the printing cost. The publisher and retailer make a few bucks and the author makes a couple of bucks.

I met an author last month who’s sold more than half a million books. He drives a Hyundai.

An awful lot of authors could make more money doing something else for a living. Those who choose to make a living writing are doing it for prestige or independece or enjoyment, much more so than for the money.

So I’m not convinced that self-publishing–especially print-on-demand self-publishing with little or no up-front cost–is a bad idea. Now that’s not to say I’m going to run out and self-publish immediately. But the thought’s crossed my mind a few times, yes. And if I had enough material already written for one reason or another to make up about half of a book (the half-book I wrote two years ago about Linux doesn’t qualify–I’d have to buy back the rights to parts of it), I’d probably write the other half and do it, for exactly the same reason that some musicians choose to self-publish.