0

I am trying to setup dynamic dns service (for personal usage). Something similar to dynds.org.

Things done so far: - delegated example.org to external dns server in ovh (my box) - setup bind to accept example.org - added subdomain home.example.org to bind config file with ttl 60

The goal is: - home.example.org should be updated frequently (every minute just like dyndns service) with destination IP address of my home network (dynamic IP address) - I will catch ping from my home network, save it to zone file and execute rndc reload example.org on my dns server - it should be propagated across world (just like dyndns)

The question is: how should "proper" zone file look like to be sure it will not be cached for more than one minute and that all world dns servers will ask my server for current ip.

The problem is that when I do dig flies.dyndns-home.com any I can see that TTL drops:

flies.dyndns-home.com. 19 IN A X.X.X.X

flies.dyndns-home.com. 3 IN A X.X.X.X

but it's not the case with my domain:

home.example.org. 60 IN A X.X.X.X

home.example.org. 60 IN A X.X.X.X

It's always 60.

Any help would be appreciated.

1 Answer 1

1

The difference is that what you call 'world dns' is a caching server, and 'your domain' is Authoritative for the zone you're requesting. It's totally different roles for DNS software, however most of implementations can do both.

Caching server doesn't store genuine information about the name, so it shows it's own TTL to give you an idea of how long the record will exist before renewing it.

Authoritative server answers with TTL confiured for the record, because the source of this information is local database, and it has now original TTL.

As for method for updating, BIND software has a standard utility called nsupdate for that. See here You can put a key to a server in your network, and run nsupdate on that, updating a remote BIND DNS server.

3
  • So if I understand correctly: simply setting ttl to 60 seconds will give me the required result, right? Aug 12, 2013 at 11:29
  • Yes, you have proper configuration for TTL. For the updating DNS record, I'm going to extend my answer just a bit later.
    – DukeLion
    Aug 12, 2013 at 11:58
  • Actually updating was an easy part :) I have switched to powerdns with mysql support. I am simply touching my php script and updating the record via mysql class. Works like a charm. Thanks for pointing out my misunderstaing with caching/authority. Aug 12, 2013 at 14:11

Not the answer you're looking for? Browse other questions tagged .