Spam Stopper Working Great
August 12, 2005 by Eric Richardson
After letting it run overnight, I can say that the new referer spam killer is working like a charm. I've posted the code if you're interested in seeing the details. All I know is I love seeing entries like this in my log file:
200.181.52.174 - - [12/Aug/2005:12:15:34 -0700] "GET /blog/1549 HTTP/1.1" 403 9 "http://casino-games.casino-light.com/" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1)"
I have the code registered as the PerlPostReadRequestHandler for blogdowntown and blog.ericrichardson.com. That means it gets called before we've wasted much time processing the connection.
I also wrote a little log cleaner script to use SpamKiller::Handler and clean referer spam infested log files. This is helpful for old hits; new ones are 403 and don't get counted as referrals (at least in awstats).
If your problem is just comment spam that's coming in without the referers, the same technique could be used to just scan posted comments and reverse lookup the urls.
Starting the Fight Back
August 11, 2005 by Eric Richardson
Today I launched my first salvo in the war against comment and referer spam. The situation had gotten ridiculous, especially over on blogdowntown, where I had seen 850 or so comment spams in about a week. Looking at stats had become similarly useless, since the visit numbers had ballooned 150% with the traffic. The attacks all come from different IP addresses, but today I realized that the websites they point to have to actually be hosted somewhere -- and it's a lot harder to find a hosting IP than it is to hijack some European desktop to do your spamming.
And so just now I'm putting in place a mod_perl handler that sits as early in the connection process as possible and singles out offending IP addresses based on their referers. It then blocks both the IP and the referer, and returns a 403 Forbidden error.
The beauty is that while I'm only actually filtering referer spam, I'm knocking out the bots that were doing the comment spam at the same time, since the bot is double-dipping. The IP continues to be blocked, even when it no longer has the referer.
Early testing has worked well. I don't think site responsiveness should be noticably effected. We'll see if that holds true.
One More Night in the Windy City
August 09, 2005 by Eric Richardson
Today's plans to get to Chicago via train went off perfectly. Kathy and I boarded the 10:30 South Shore train in Michigan City and were in Chicago at noon. We wandered around pretty much every block on the loop, ate a great dinner, picked my bags up from the lockers at Union Station, and I took her back to the station. She intended to catch the 7:18 train, but the 6pm had been delayed and she caught that out at 6:45pm instead. I walked back to the Blue Line and rode out to O'Hare.
I wasn't checking any bags, so check-in took a literal thirty seconds. The security line was non-existant; I was worried I wouldn't have my metal objects out of my pockets and into my bag before I got to the front. All told, I was at the gate ten minutes after entering the airport.
Then they cancelled my flight. — Continue Reading...
How to Do Chicago via Trains
August 08, 2005 by Eric Richardson
Tomorrow evening I fly back to LA. The plan is for Kathy and I to head into Chicago (she's here in MI for a few more weeks), hang out for the day doing whatever, and then I'll take the Blue Line to the airport in the evening and she'll head back home.
This gives me another chance to figure out one of those trips I like so much. What's the best way to get from Muskegon, MI, to Chicago, IL, spend the day, and have one person make it back in the evening while the other heads on to O'Hare? — Continue Reading...
California Thinks Pennsylvania is Out to Get Me
August 03, 2005 by Eric Richardson
I went to the DMV today to get a California driver's license. I've been out here for four years now, but being a student you don't have to necessarily change your license/insurance/etc, so it's been one of those things I've put off. Now, though, since I don't have a car to worry about I figured I might as well go ahead and make the switch.
I made an appointment at the Lincoln Park branch, and that all worked out just fine. Of course I forgot to bring cash and had to take a 45 minute stroll to find an ATM, but that's my fault, not theirs. The written test was easy enough, and I sort of skipped the vision part (which I think might mean I get a corrective lenses restriction, but that's really not something I care about).
Here's where things get weird, though... They can't issue the actual license until I take care of something that showed up in the computer as a ticket in the state of Pennsylvania.
To my knowledge I have never had a ticket in PA, nor have I been pulled over there. In fact I just called PennDOT, and they don't have me in their computers. — Continue Reading...