Tuesday, February 17, 2009

Packet Protector

A friend recently purchased an ASUS WL-500g Premium V2 wifi router and installed PacketProtector on it for his mom. She wanted some filtering for the household internet connection, and my buddy thought that this would be a nice self-contained, stand-alone, hard-to-bypass solution for her and the fam. So far it seems to be all of that.

I got to thinking about my own curious boys and wondering if I might want some DansGuardian filtering on my own internet connection. I've been pretty anti web filter ever since I discovered the web, mainly because I've been successful at avoiding and ignoring bad stuff on my own, and have only been annoyed by filters that always seem to block useful pages right when you need them. I've realized lately, though, that without even thinking about it very much, I really don't let my kids online at all. I think it's because I know that they won't be able to avoid all the bad stuff, and I fear they won't ignore and quickly move past it like a well disciplined adult (ha!) would. That's a shame though. My 8-year old has a lot of curiosity and questions about how things work and why things are the way they are, and doing a little internet research insteading just bugging asking Mom and Dad would do him a lot of good. I don't think he even knows how to google. I started to think that some filtering might set us free at our house.

With that all in mind, I got online and my own ASUS router arrived a few days ago as I had just started reading up on PacketProtector. Installing it was a little tricky but not too bad. They key for me was the openwrt wiki page on using tftp. That ifconfig command to get the network settings correct was what I had missed at first.

Once packetprotector was all up and running with the USB stick, it was time to config it. There is very little documentation, so I thought I'd better write down what I went through.

To get to the web interface I had to make sure and use https, not http, and then the same username and password that you use for ssh to log in.

Wireless is off by default. I turned it on, but still couldn't get connected. I tried without any encryption. Then I changed it to a 128-bit WEP key instead of a 40-bit key and my Intrepid Ibex box connected just fine. Interesting.

Dansguardian is off by default. Enable it under the Proxy menu. You can test its basic operation by visiting this website that has, " a DG score of 475 since it mentions bypassing DG."

Poking into the dansguardian config files, I noticed that pretty much everything but the weighted phrase lists were commented out. I asked my buddy about this, and he asked if I had noticed that it was using OpenDNS (I suggest reading the wikipedia entry on OpenDNS as well). It seems that, maybe to save the router some work, OpenDNS is relied upon for blacklisting instead of DanGuardian. I signed up for an OpenDNS account and that seems to work pretty well. Well enough that I wonder if I even need this fancy router setup.

Other things that Packet Protector does is clamav and snort scanning of your network traffic. I was noticing some increased latency in my browsing with both of those turned on, so I disabled clamav and things seemed to speed up (I rarely use windoze at home and feel plenty safe without it). My friend forwarded me this Packet Protector performance report, which seems to contradict my unscientific findings, but oh well. Maybe I'll try his test myself, but overall I'm with the others on that forum thread. This is all running on only $90 of hardware. It can be excused for being a little slow.

Packet Protector needs some serious documentation help. The web-based configuration could really use some help too. I think it's a great idea though, and I think I'll stick with it. I can tell that the filtering isn't perfect, so I'll still need to have some Fatherly Chats with my son before (and after) setting him free on the internet. Since he and I both just love having those, hopefully some filtering will lessen the need for them at least a little.

Thursday, February 12, 2009

Laptop Twinview Dual-external Displays

I feel like I'm so close on this, but I'm just not getting it. I mentioned my 8510w laptop setup previously, and how I have two xorg.conf files that I switch between, restarting X to configure using either my dual-external displays or my laptop display. Well, I'm not satisfied with this setup. I've been playing with xrandr and MetaModes and I can use xrandr to switch from the dual external displays to the single laptop display, and I can sort of switch back to the external displays, but it either only uses one of them and you can pan to view the whole dual-display-sized screen, or it uses the laptop display and one of the external displays. Grr.

Has anyone been able to get this to work? I've seen mention of using refresh rates or EDID to somehow get this working, but I haven't seen any solid examples of what to do. I've also seen suggestions to just use nvidia-settings. That's a lot of clicking. I'd love just a simple script to run.

Monday, February 9, 2009

Web Site Stats Are Fun

I hooked Google Analytics up to this blog and have had fun looking at all the stats in their different views. I was about to do the same for my little family blog that I run on my home machine, when I realized that I have all the log files right there, I shouldn't need Google's crazy javascript to figure the stats out for me. Cue awstats. I combined advice from here and here to get it set up, and it wasn't too difficult. It's cool to see where people are coming from (some friends of ours have blogs, and we didn't even know it!), and what crazy search terms people find our site with ("are fumes from rotten milk toxic?"). I know, web site stats are old news for most hardened bloggers, but I'm liking it.

Thursday, February 5, 2009

Phone on Fire

Another interesting embedded systems blog. The sample chapter from her book was an entertaining read too. I got a little impatient with the explanations to the, evidently, inexperienced co-worker and I just wanted to get to the end of the chapter to see that I was right about the cause of the bug. The sloppy indentation was a little too much of a giveaway, if you ask me. I first thought that it was a perfect argument against coding standards, seeing as how that buggy line wouldn't have stood out so much if it had been following the standard, but then I realized that if there was no standard (as I've seen somewhere before), then all the lines look equally sloppy and the bad ones never stick out like that (because the buggy code is always formatted incorrectly :-)

Anyway, not your usual embedded systems reading material, in a very good way. I'm glad the Embedded Muse pointed it out.

Monday, February 2, 2009

Bike Headlight

It gets dark early up here in winter, so I've got a little more to say about flashlights. About a year ago my wife and I sold my old Nissan Altima and I used the proceeds (and then some) to buy a nice bicycle for commuting to work. At this time of year, when I first got the bike, it's just getting bright enough when I come home from work that I didn't need much of a headlight, so I thought I was all set up with the cheap headlight from Fred Meyer. As winter came this year I quickly learned just how dark it gets by 5 PM up here in the northwest. I needed a better headlight.

Being the cost-conscious engineer that I am, I did my due diligence researching and looking around before I decided on a solution. There was no way I wanted to pay upwards of a hundred dollars for a headlight. For a while I thought about making my own headlight, but then I found a website that talked all about using flashlights as bicycle headlights (UPDATE: safer for work link, with more ideas). These were cheaper than the parts lists on instructables, more robust, and with this setup you could still easily use it as a regular hand-held flashlight when you weren't biking. I was sold. I headed down to our new Lowe's and got the Task Force 3 Watt LED Flashlight and some conduit hanger and rigged it all up:

I used some JB Weld to make sure the two hangers held together (at the enthusiastic recommendation of the Lowe's guy) and it works great. The flashlight is really bright, especially for only $25. The downside is that it rattles. It's not just the batteries, as the website states, it's something inside the on/off switch endcap. I haven't taken it apart to see if I can figure it out. I love having a light that bright and the rattles don't bother me very much. I worry more about blinding oncoming drivers. It's awesome.

I found a nice addition to my lighting system at Walmart not too many weeks later. They sell a bunch of different Coleman flashlights using Cree XR-E LEDs (the instructables people concur that those are the best). I bought a headlamp for $25 that is even brighter than that Task Force from Lowe's. I seriously could get by with just that on my rides home from work, but I use both now. The Task Force is more focused and goes farther, the headlamp beam spreads out more and lights up the road right in front of me better. With them both blazing I feel ready for the darkest of dark. Lights are cool.