A home network overengineered: dhcpd, tsig keys, ddns

I started to write this post, explaining how I upgraded my home network setup with a dhcpd server, multiple dns servers communicating securely via tsig keys along with dynamic dns, but the post became unwieldy and would have been thousands of words. Instead, I’ll post some links and gotcha’s and hints on how to make it work a lot easier. Links scoured and re-read in the process: Securing zone tranfers with TSIG Bind Security: Transaction Signatures (TSIG) Configuration Security Zone Transfers With Bind 9 Hints:

Remind Me: Initial Data in a Django class-based Form

I love Django’s class-based way of handling forms. You name the class, articulate each field (data point of your form), and attach it to a view. Voila. But what happens when you want some initial data in the form? Initial to the rescue! What your class might look like: class PersonForm(forms.Form): first_name \= forms.CharField(max_length\=100) last_name \= forms.CharField(max_length\=100) gender \= forms.CharField(max_length\=1) hair_color \= forms.CharField(max_length\=256) If you now wanted to initialize your form for males with blonde hair, include this snippet in your view:

Boston Barcamp 6, Day Two

Finally got this post out after having a bit of a busy week. Location based networking, anurag wakhlu (coloci inc) http://goo.gl/mxAtd * location based apps: where are you now? or where will you be? * where are you now: foursquare, gowalla, loopt, etc * where will you be: coloci, fyesa, tripit, plancast * interest based networking: the reason to talk to someone who is near you. tie an interest: sending someone a coupon when they are near starbucks.

Barcamp Boston 6, Day One

Having never been to a Barcamp before, I knew the overall structure of the conference, but was curious if I would actually like it. Truth be told, I found it full of content, without a lot of fluff, even for the talks I sat in on where I had no prior knowledge. My notes follow, thanks to the great OSX app Notational Velocity hooked up to Simplenote. My overall thoughts in italic after each post.

New toy, Nikon style.

It had only been ‘recently’ that I had purchased myself a micro four-thirds digital camera for my honeymoon. It took pretty good pictures, and I loved its compactness when roaming around Portugal for 10 days. But I had always wanted a bit more control over the photos I took; whether it was exposure modification, lense type, or overall flexiblity for shooting in different situations (low light at night). ‘Lo and behold, Nikon announced the D7000.

Remind Me: Adding SNMP mibs for querying

I was having issues trying to get Nagios to more easily query my APC UPS with the APC-provided MIB. It took me a while to figure out the right bits both on the file system and in my query to have the MIB ‘processed.’ I still don’t know how to add that MIB to the “automatically process me too if snmpwalk is run” piece of the puzzle. But for what I have running a home, some notes for myself and others who ripped out enough hair already.

You go here, you go there. Bending DHCP to your will.

TL;DR: How to hand out DNS servers in different orders to different clients based upon MAC address. Background: I was connected into my office’s VPN a few months ago and was noticed some very slow DNS resolution of host names back at the office. I would attempt to ssh into another host, and the connection would sit there for more than a few seconds before finally proceeding. This didn’t happen for just ssh, but also for making http requests.

Remind me: Configuring BIND9 plugin for Munin on FreeBSD (and Linux)

I was attempting to get Munin working on a new FreeBSD machine, monitoring the rate of queries to a Bind9 DNS server. Every time I attempted ‘munin-run bind9’ I was presented with the same error: 2011/01/29-18:09:55 [3581] Error output from bind9: 2011/01/29-18:09:55 [3581] Died at /usr/local/etc/munin/plugins/bind9 line 41. 2011/01/29-18:09:55 [3581] Service ‘bind9’ exited with status 2⁄0. Digging around in the Bind9 Munin plugin, line 41 complains about a state file that Munin uses.

Munin monitoring your SB6120 Comcast Cable Modem

For those who have spent time debugging their Comcast Internet connection, we all know the frustration of trying to explain to Comcast that something on their end is the problem. In this case, more data is better: latency history, ping times, traceroutes, etc. You can run Smokeping to monitor latency between your home connection and a remote Internet IP address for example. You can also print out traceroute examples and email them if you have an astute support contact.

I Am Lazy: Python, to convert a file's age in seconds since epoch to a readable format

For my own lazyness, so I don’t need to hunt for this damn chain of syntax. >>> time.strftime(“%Y%m%d-%H%M.%S”, time.gmtime(os.path.getctime(“$path_to_file”))) ‘20101213-1948.58’ >>>> time.strftime(“%Y%m%d-%H%M.%S”, time.gmtime(os.path.getctime(“$path_to_file”))) ‘20101213-1948.58’