DDNS with NSD3?

I've already seen the other threads regarding DDNS on Linode, however the general consensus is to use Linode's API. Problem is, I am hellbent on running my own DNS, partly because I'm paranoid, and partly because I'm a hard core DIYer.

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? :? ). Since I've gotten NSD3 already working nicely, and it seems otherwise capable of fulfilling my needs, I don't want to risk switching – why fix what's not broke?

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 :wink:

3 Replies

You could use a private repo on bitbucket for this. You could then write a quick Python script, for example, to check if your repo has had any updates (recently) and then have it 'git pull'.

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.



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!

I have a very simple CGI script that I call from my workstation every 5 minutes:


use Socket;

my $r=$ENV{'REMOTE_ADDR'};

print "Content-Type: text/plain\n\n";
print "You are: $r\n";



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 http://my.server/dynamic_ip.cgi" via cron every 5 minues.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct