DDNS with NSD3?
I've done some searching around on Google for this, and so far the solutions I've are to either use some other NS daemon with built-in or to use a server-side Perl script for BIND to update via cron (how does that work?
Question is: is it possible for novice coder like me (who can barely combine PHP's if/else and echo with HTML/CSS) to make this happen, e.g. have a web page or a daemon on my 'Node that I can ping from my laptop to make the update happen? I'm sure I could write a crude PHP page that'll do it -- problem is securing it while still allowing it to be automated. With my limited experience, I'd end up using HTTP GET to send a user/password combo -- not very secure at all
3 Replies
You could also write a cron job to just pull every so often and reload nsd3.
Or just a big for loop that SSHes in and does the needful.
-Tim
@Piki:
e.g. have a web page or a daemon on my 'Node that I can ping from my laptop to make the update happen?
single-packet auth for dynamic DNS? there's an idea!
#!/usr/bin/perl
use Socket;
my $r=$ENV{'REMOTE_ADDR'};
$r=~s/^::ffff://;
print "Content-Type: text/plain\n\n";
print "You are: $r\n";
$host="my.dns.name";
@name=gethostbyname($host);
$ip=inet_ntoa($name[4]);
print "$host: $ip\n";
That'll return the value stored in DNS and the value of the client. In my case the client controls my own DNS server locally (linode is a slave server), but it'd be simple for this code to to compare $ip to $r and if it was different then perform a DNS update, depending on how you implement your DNS update code.
The client machine effectively then does a "wget