[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DNS Records - changing programmatically?



On Sunday 11 February 2001 17:42, Erik Reuter wrote:
> 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
> line.
>
> 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
> you think?

Exist internet Co.  that offer You dynamic dns support, some with Your own 
domain name ( You've to pay ) while other ( free ) with their own subdomain ( 
dyndns.org ).
These services enable You to change Your IP with a simple HTTP GET string 
like :

GET www.dyndns.org/sgi-bin/update?user=USER&pass=PASS&host=HOST&ip=IP

You've simply to setup a script with wget that read ifconfig and post the GET.
These services ( dynamic ) use a low TTL to lower the propagation time of DNS 
infos.
Anyway bind has a library that enable You to change DNS entries.



- Davide



Reply to: