Dynamic DNS Script

apps

#1

Basically what I’m looking to do is update the dns record in the dreamhost control panel every so often. During my research I found exactly what I was looking for on the wiki, but it doesn’t appear to work. Did some searching but I can’t find anything. Any ideas?

Dynamic DNS - DreamHost Wiki

[quote]Dynamic DNS via your web server

An example dyndns implementation using the Dreamhost API can be found here.

To use it,

create a dreamhost key that can access dns-* methods in your account
download the php to somewhere on your dreamhost web space: 

wget -O dyndns.php "http://smoser.brickies.net/git/?p=dreamhost-tools.git;a=blob_plain;f=dh-dyndns.php"
chmod go-rwx dyndns.php
vi dyndns.php

edit ‘$DH_API_KEY’, setting the value to the key given to you above

edit ‘$HOSTS’ to limit it to only the dns entries you wish to allow modification to

edit ‘$PASSWD’ to protect this page

Now, from any web browser or client, you can simply make a request to the server: 

base_url="${your_url_location}/dyndns.php"
pass=“your_pass” # password matching PASSWD above
ip=“192.168.1.1” # update addr, or leave empty to have the server grab the clients address
host=“myhost.example.com” # whatever host you want to update record for

wget “${base_url}?host=${host}&passwd=${pass}&ip=${ip}”

There are surely improvements that can be made to the above. If you have ideas (or patches), please send to smoser @ no-spam-me @ brickies dot net [/quote]