Do not pass Reboot, do not collect $200…

One of the annoying things about Windows XP is its tendency to keep pestering the user to reboot after updates have been installed. I’m sure I’m not the only one who’s been working on a document, only to have the “Reboot Now?” dialog box pop up, accept the spacebar keypress that was meant for your document, and happily reboot the machine — three days into that loooong simulation you’re running in FreeBASIC. Grr.

At least there’s a solution. If you stop the Automatic Updates service, the insipid messages go away and don’t come back until after you reboot. Peace at last…

Posted in System Administration | 1 Comment

How To Lose Friends And Irritate Customers

Verizon, in its eternal quest for World Domination Through Customer Annoyance, has decided that Spam Is A Problem.

Good for them, you might say — nobody likes spammers, and doing something about it must be a Good Thing™, right?

Of course, there’s a right way and a wrong way to do something like this. The right way would be to, say, traffic-shape or selectively block outbound Port 25 connections for users who were sending copious amounts of email to many different addresses (I’m sure SpamHaus and similar organizations could give them many a pointer along those lines.)

The wrong way (and unfortunately the easy way), of course, would be to decree that Port 25 is a Bad Thing™, and to block outbound Port 25 connections for all Verizon end-users.

So a few days ago, my email client could mysteriously no longer connect to the mailserver for outbound mail. Diagnosing it, I found that I was otherwise still connected to the ‘Net, and that the mailserver (gotta love Linux-based hosts with shell access) was still happily accepting connections from everyone but me. In fact, it was still talking to me, too — but only via POP.

The next step was to try from somewhere else. Being lazy, I fired up my Drexel VPN connection. Sure enough, everything started working again. HMM.

A Google search quickly fingered Verizon as the culprit — but the problem was, what to do about it? Verizon’s advice (“Just Use Port 587!”) was very unhelpful, as my mailserver had no idea WTF they were talking about.

Not having many other options, I found several pieces of advice on the ‘Net, including advice to forward Port 25 to 587 (a nasty hack that I didn’t want to inflict on a production host), to modifying the Sendmail configuration (always scary). I ran out of other options, though, and so started playing with the Sendmail configuration.

After one attempt that didn’t work so well (Sendmail started working on Port 587 but no longer bound to Port 25 — OOPS!), I finally found a helpful site that showed how to add an entry to the sendmail.mc file to make it listen on both ports. (This involved editing the sacred “Do Not Edit This File” sendmail.mc file — but that only added to the fun.)

The story has a more-or-less happy ending, with the usual trope of the villian skulking off to do yet more evil deeds in the sequel. My mail is working again, and I have actually managed to modify Sendmail without causing a huge mess.

I gotta get a real ISP one day.

Posted in System Administration | Leave a comment

The Sound of Silence

New toys are always fun, especially when you’ve heard about them but never actually gotten to play with one. The hard drive in my laptop at work had taken to making slightly disconcerting clicking sounds — nothing really ominous, but the kind of noise that makes you notice, if you’re a computer geek. I mentioned this to my supervisor (also a techie). I figured he’d agree I ought to get a new hard drive. What I didn’t figure on was his suggestion that we look into a solid-state drive. (It’s a great idea — but I didn’t think it had a chance of being approved.)

Well, it did. I just finished cloning the drive across this afternoon, and it’s amazing. These things are probably the future of storage (at least until the Next Big Thing comes along); they’re fast (think NO access time to speak of and better throughput), durable (no moving parts means I don’t have to worry as much about the laptop rattling around in my backpack), and efficient (running on the old HD yesterday, the batteries gave up after about 2 hours of note-taking in class; today, with the new HD, it ran for 3+ hours, with intermittent Wi-Fi use, and still had juice left when class ended. No need to put an ammeter on it — I’m convinced. This will definitely help in my classes (one of which is in a turn-of-the-last-century building designed long before students had a need for power outlets).

Solid-state drives are also silent. Not “quiet” — not “whisper quiet” — SILENT. When running non-CPU-intensive tasks, it’s amazing how quiet the laptop is, now. If you hold it up to your ear, you can hear the CPU fan. I never realized just how much noise the old HD made (relatively speaking).

I gotta get one of these for my desktop. Well, someday — when I’m not broke.

Posted in System Administration, Toys | 1 Comment

Under the hood

One of the most important reasons the Internet is both cool and interesting is its modularity. Different layers of the network model do their thing, without needing to care what the layers above or below them are doing. It makes writing Internet-based applications relatively straightforward, which means we get a lot of cool, shiny toys to play with. This is, of course, a Good Thing ™.

For technology geeks, though, this modularity also means that individual pieces of technology can be learned in relative isolation. You don’t have to know or care how (most of) the rest of the stack works in order to teach yourself a new piece of the puzzle.

(A brief and more-or-less-correct description of how the Internet does its thing follows. Feel free to read, skim, or ignore it; the “cool stuff” is below.)


There are generally two basic approaches to learning how the stack of Internet protocols works: “bottom-up” and “top-down.” At the bottom of the stack is the physical layer — the wires, fiber optic cables, or radiofrequency links that actually move the information around. The next few layers deal with the electronics that translate the information back and forth and get it where it’s going. Higher up are layers that handle authentication (where needed), and the Application Layer — which is concerned with actually doing the task at hand. Information travels up and down these layers every time any action is initiated on the Internet (or other TCP/IP network).

For instance, suppose you click on a link to this blog. Your browser, at the Application layer, translates this into a request to the appropriate web server (www.paleotechnologist.net). It then uses knowledge of HTTP (HyperText Transfer Protocol) to formulate a request in a way the webserver can understand. Once this specific, formal request is created, the browser passes it to your computer’s network protocol stack, which looks up the IP address of the webserver, packages the request into a TCP/IP packet, and sends it off to your computer’s default gateway router, with its destination marked as Port 80 at the webserver’s IP address. The packet passes through your computer’s network adapter (or modem, if you’re on dial-up), to the gateway, which starts routing it across the Internet.

Once the packet gets where it’s going, the information makes its way back through the layers in reverse order. The network card on the webserver computer receives the request, strips out the relevant information, and passes it to the webserver program. This program inspects it and finds that it understands the request, gets the information requested from local memory or the hard drive, and creates a reply packet (or many reply packets) containing the requested information. These go back through the same process to your computer, where the information is processed into a web page.

The amazing part is that all of this (usually) happens in a few milliseconds’ time.

The HTTP protocol is one of those things that don’t always get a lot of attention. It does its thing, so most folks don’t think about it. I recently came across a post on Slashdot that suggested taking a look at the HTTP headers being sent out by the Slashdot web server. It suggested running the following command in Linux:


echo -e “HEAD / HTTP/1.1\nHost: slashdot.org\n\n” | netcat slashdot.org 80 

Being an inquisitive sort (and not seeing anything really harmful-looking in the command), I decided to try it out. As it turns out, the Linux box I have available doesn’t have netcat installed, so I decided to take the lazy way out and try telnetting to Port 80 using Windows. ( C:\> telnet slashdot.org 80 )

Amazingly, it actually worked. Here’s what I sent:


HEAD / HTTP/1.1 <enter>
Host: slashdot.org <enter>
<enter>

…and I received:


HTTP/1.1 200 OK
Server: Apache/1.3.41 (Unix) mod_perl/1.31-rc4
SLASH_LOG_DATA: shtml
X-Powered-By: Slash 2.005001
X-Bender: The laws of science be a harsh mistress.
X-XRDS-Location: http://slashdot.org/slashdot.xrds
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=iso-8859-1
Content-Length: 99945
Date: Sat, 12 Sep 2009 16:14:08 GMT
X-Varnish: 1558400757 1558400652
Age: 6
Connection: keep-alive 

First of all, I just impersonated a Web browser — and you can, too! How cool is that? You open a Telnet connection to the webserver’s Port 80, send a properly-formatted request for information, and it replies.

The other interesting part — a little wasteful but still cool — is the “X-Bender:” header. Slashdot’s webservers apparently insert interesting little quotes from Bender and other staples of geek culture into their HTTP headers. (If the Internet is the Information Superhighway, think of this sort of thing like the “wash me” and “I may be slow, but I’m ahead of you” messages you sometimes see written in the dust on the back of eighteen-wheelers. The Muggles shopping at the Wal-Marts where the trucks deliver their goods will never see these messages, but they’re there if you know where to look. Geeks being geeks, the dark steam tunnels of Internet protocols are no doubt full of such things.)

Finally, a bit of philosophy. The reason it all works — and the reason that it’s so open and free — is exactly this sort of modularity. Why is playing with the HTTP protocol cool? Not because it’s particularly interesting, but because, out there, there’s a document that shows the publicly-available, agreed-upon protocol for requesting information from a webserver — and if this protocol is followed, it works no matter who wrote the webserver, what country it’s in, what language the programmers used (or speak), or what information is on the server. HTTP, in turn, rests on other, similar layers, with other, similar protocols. With the proper (freely available) documentation in hand, you could build your own network from scratch — blowing glass to make vacuum tubes and designing your own computer, and connect it to a cable or DSL modem in your house. If you did everything right, it would work. No magic, no proprietary “sorry, you don’t get to see how this bit works,” no smoke-and-mirrors. If you use an open-source OS like Linux, you can (in theory) literally understand every movement of every bit, all the way through the whole process. It’s both a great way to learn about technology — and a great way to show just how cool freedom is.

We need to make sure it always stays this way.

Posted in Coding, System Administration | 1 Comment