DNS Records - changing programmatically?
I'm trying to find an easy way to programmatically change a few DNS
records. Specifically, I want to be able to change the IP number that is
pointed to by my domain name with a program that is run from a cron job.
I'd like some suggestions about the best and easiest way to do this.
Here's the situation: I have two DSL lines (and two DSL gateways) in
my home, and sometimes one or the other of the DSL lines will go down
for an indefinite period of time. Right now, when this happens to
the line that I am using, and when I am at home, I switch my network
settings (/etc/network/interfaces, /etc/hosts) over to use the other DSL
line. Then I log onto my account at www.centralinfo.net and use the web
interface to change the IP number for erikreuter.com to the other DSL
But I can only do this if I am home, and then only if I happen to notice
that the line is down. I suppose I could set up so that I could do this
remotely by telnet'ing in on the other DSL line, but what I really want
to do is to automate the whole process.
I can easily write a shell script to ping a DNS server or some other
always up site to see if the network is up, and if not, to switch
the network settings to the other line. However, I don't know how to
automatically change my DNS records. Theoretically, I could write a
http(s) program to access the web interface to centralinfo.net and
to change the records, but I do not have the knowledge/time to do
that. Besides, it seems like it would be reinventing the wheel.
So, can any DNS experts give me some suggestions? I am willing to switch
to a non-free DNS provider if the cost isn't too great and if that would
make my task easier. The best thing would be for someone to send me
a program or shell script that I can modify and the name of the DNS
provider they use the script with. But all advice is welcome. What do
"Erik Reuter" <email@example.com> http://www.erikreuter.com/