updating dynamic DNS automatically

None of the allegedly automatic methods actually, you know, work. Automatically, that is. So I hacked this together. It grabs the last-known address and the actual dynamic address then compares them. If in sync, it exits: if not, it sends update requests. Not sure what interval to run it on but I guess I’ll just pick one and crank it up or down until I see minimal disruptions in service; ie notes to the logfile that the addresses got out of sync.

#!/usr/local/bin/bash
export THEN=`dnsip mail.thistledew.org` # hostname you're monitoring
#export THEN=`nslookup ${HOME} | tail -1 | awk -F" " '{ print $3 }'` # alternate method w/o djbdns
export NOW=`http://wget -qO- icanhazip.com` # what the internet thinks your address is
if [ ${NOW} != ${THEN} ]; then
    # echo "ping"
    logger "ip addresses out of sync: updating"
    /usr/local/bin/update-afraidns.sh # your various update methods go here 
    /usr/local/bin/dyndns.sh > /dev/null 2>&1
else
    # echo "pong"
    exit 0
fi

Update: at the month mark, this seems to be working. I get notified when it needs to sync addresses (usually at just past 4AM) and it’s not too often. It runs every 5 minutes (not sure when I changed it to that: used to be once per hour but that seemed miss some of the IP address fluctuations). I could use some of the other client software I see (OpenDNS recommends one but I never got on with it) but this seems to work. Just enough to get the job done, not enough to be truly useful anywhere else, except as a model of how not to do it, perhaps.

Update, July 5, 2011: If I had thought this through, I would have tested the DNS servers I use more carefully. Turns out one of the four, between two providers, was constantly flaky.

$ host mail.thistledew.org ns1.afraid.org
mail.thistledew.org has address 174.21.112.113

$ host mail.thistledew.org ns3.afraid.org
mail.thistledew.org has address 174.21.112.113

$ host mail.thistledew.org ns9.zoneedit.com
mail.thistledew.org has address 174.21.112.113

$ host mail.thistledew.org ns15.zoneedit.com
mail.thistledew.org has address 174.21.122.16

Someone got voted off the island.

What’s Finland got that we ain’t got?

Link: What’s Finland got that we ain’t got?

NEA – What we can learn from Finland’s successful school reform

Couple of things come to mind: 

  • Finland is a pretty homogeneous place, not a lot of immigrants to accommodate, in either numbers or diverse languages
  • It has a reputation for social equality (as does the rest of Scandinavia)
  • It has some well-known high-tech industries (Saab, Nokia)
  • There are benefits to being a small independent country instead of a superpower.

Couple of things I looked up:

  • Finland’s population is 5,338,395 vs 307 million for the US
  • $34K GDP vs $46K for the US
  • 64% of Finns live in towns, with most in one southern central plain: 81% of Americans live in cities or suburbs, with densities for both countries at 44 and 84 people per sq mile, respectively. 

Interestingly, Finland’s organized labor is more prominent and more powerful than we have here in the US. But they’re not the problem. 

The perpetual school reform movement is a societal and cultural issue more than anything. We talk about equality as a key part of our democratic ideals but our thought leader abandon public schools for private schools as soon as they can. 

Grammar (Time, one hour)
1. Give nine rules for the use of Capital Letters.

Arithmetic (Time, 1.25 hours)
1. Name and define the Fundamental Rules of Arithmetic.

U.S. History (Time, 45 minutes)
1. Give the epochs into which U.S. History is divided.

Orthography (Time, one hour)
1. What is meant by the following: Alphabet, phonetic, orthography, etymology, syllabication?

Geography (Time, one hour)
1. What is climate? Upon what does climate depend?

This is the eighth-grade final exam from 1895 from Salina, KS. USA.Each of these sections had about 10 questions. There were no multiple choice answers. 


8th Grade Exam

Schools are finally realizing if you don’t have standards-based grading you really do not have a standards-based education.

No More A’s for Good Behavior – NYTimes.com 

This seems like something that should have been figured out some time ago, that grading and assessing mastery is more important that deportment and compliance. Maybe this is the first step to identifying kids whose lack of compliance — missed homework, inattention — is due to their not being challenged. 

What Makes a Great Teacher?

Link: What Makes a Great Teacher?

http://www.theatlantic.com/magazine/archive/2010/01/what-makes-a-great-teacher/7841/

Just as soldiers know best what works on the ground, perhaps our educational system will re-focus on tactics instead of strategy. The top-down approach doesn’t work, given the sheer number of entities — school boards, citizens groups, unions, legislative committees, PACs, thinktanks, textbook publishers, test administrators — who have an axe to grind. As the old saying goes, everything works in Theory, but we don’t live there. 

from A meeting of solitudes – Roger Ebert’s Journal

Roger Ebert reports on the human condition.

The bottom line is that so many of you were betrayed by life before you really even got started. How must it feel to be told by a parent that you are stupid, ugly, worthless? To be struck by such a parent? To be hated by the supreme authority in your young life? And then often begged to forgive and understand them? What’s that about? The cruelty is clear cut. But the pleas for remorse must inspire pity and contempt. The lesson is that people can be shabby and mean, and not to be trusted. People can be evil. No wonder you live in a shell. I still remember hurts and wounds from my early years, and know they were trivial. How must it feel to be struck by a parent? How can a parent be so cruel?

[From A meeting of solitudes – Roger Ebert’s Journal]

I could write a bunch on this, but I think his questions are better than my answers could ever be. You can imagine how it feels “to be told by a parent that you are stupid, ugly, worthless.” But I don’t have to imagine it.

I know the answer to his penultimate question (“How must it feel to be struck by a parent?”) but not the last one. Better to ask how people like that willingly become parents and don’t see the things they do and what they mean.

Who thought it was a good idea to make things worse for generations yet to come?

Link: Who thought it was a good idea to make things worse for generations yet to come?

We’re doing to higher education what we already did to secondary education; private schools, and public schools barely scraping by with lower standards, with smart people knowing that that’s not where you send your kids if you value education, except that we’ll want those public university students to take out lots of loans.