If you have an account with dyndns.org or some other dynamic dns service and you want your dynamic IP updated automatically you need to use some type of script. The alternative is you could manually login to the service and change the IP each time your lease expires... egad! The latter was not what I wanted so I searched the long list of clients which were available. The one I chose (mainly because it was supposed to work with the D-Link DI704P) was ipcheck. It is a python script "ipcheck.py" you simply pass a few options on the command line and away it goes... not!
I finally got the thing to work but it does require modifying the script. You can pass the username and password for the D-Link on the command line but there is no need to. The D-Link DI704P does not require you to login to access the status.htm page! I just commented out the part where the script does the login because it was causing me alot of grief. Another bug was the default user for the DI704 was set to root and should be admin. Finally where the script searches for the IP Address it was finding the LAN IP not the WAN IP. I changed the search KEY from "IP Address" to "WAN" and it worked.
If you get the ipcheck.py script for use on a DI704P Router here are the changes I made:
< DI704_user = "root"
> DI704_user = "admin"
< params = urllib.urlencode( menud )
< ipurl = "http://" + iphost + "/cgi-bin/login"
< logger.logit("urlopen " + ipurl)
< urlfp = urllib.urlopen(ipurl, params)
< ipdata = urlfp.read()
< filename = "post.out"
< if opt_directory:
< filename = opt_directory + filename
< fp = open(filename, "w")
< logger.logit("post.out file created")
> # params = urllib.urlencode( menud )
> # ipurl = "http://" + iphost + "/cgi-bin/login"
> # logger.logit("urlopen " + ipurl)
> # urlfp = urllib.urlopen(ipurl, params)
> # logger.logit("urlfp.read")
> # ipdata = urlfp.read()
> # logger.logit("urlfp.close")
> # urlfp.close()
> # filename = "post.out"
> # if opt_directory:
> # filename = opt_directory + filename
> # fp = open(filename, "w")
> # fp.write(ipdata)
> # fp.close()
> # logger.logit("post.out file created")
< p1 = string.find(ipdata, "IP Address")
> p1 = string.find(ipdata, "WAN")
Yes I did email the author.