I recently registered a couple of domains and though I’ve been happy with dyndns figured I’d try a free DNS service. dnsexit seemed to have what I needed and I was able to get up and running quickly without any issues. I typically use ddclient for sending my updated IP address to dyndns, but since ddclient doesn’t support dnsexit, I was left to my own resources. The scripts provided by dnsexit were not as full featured as ddclient and didn’t have support for common routers. What I ended up doing was bastardizing domainUpdate (from the bottom of the scripts page) and using it with routerip.pl
To make this work, first install routerip.pl and domainUpdate.pl updating all the necessary variables. Then just change domainUpdate.pl to use routerip.pl to get the IP address of your router instead of your local machine:
replace:
# get IP from @network
# --------------------
foreach $line (@network) {
if ($line =~ /.*inet addr:(.*) P-t-P.*/)
{
$ip = $1;
last;
}
}
with this:
# get IP from routerip.pl #-------------------- $ip = `/usr/bin/routerip.pl`; chomp $ip;
Also, since I had more than one domain to update I changed domainUpdate.pl to handle that too by changing the scalar $domain to an array (@domain) and replacing:
if ($ip ne $lastip) {
$update = "http://www.dnsexit.com/RemoteUpdate.sv?login=$user&password=$pass&host=$domain&myip=$ip";
get($update);
open(FILE,">$ipfile") || die "Can't open $ipfile $!\n";
print FILE "$ip";
close(FILE);
`$logger "IP updated."`;
print "IP updated!\n";
}
with:
if ($ip ne $lastip) {
foreach $domain (@domains)
{
$update = "http://www.dnsexit.com/RemoteUpdate.sv?login=$user&password=$pass&host=$domain&myip=$ip";
$success = get($update);
die "Could not connect to dnsexitn" unless (defined($success));
open(FILE,">$ipfile") || die "Can't open $ipfile $!n";
print FILE "$ip";
close(FILE);
`$logger "IP updated."`;
print "IP updated!n";
}
}





