8

We have Linux boxes with static IP, some using Centos and other Debian, using IP ranges reserved for development and testing.

We need this boxes to 'publish' their DNS into DNS Server 2008R2, without administrator nor manual intervention.

These hosts has their hostname properly configured, but they don't register themselves to the DNS, so I cannot access them with their hostname.

On a windows box, this process is automatic and you can force re-registration with ipconfig /registerdns. Do we have equivalent for the Linux family?

The idea is to make these hosts to automatically add an entry for themselves on the DNS server so I can access them using their hostname.

RFC 2136 `Dynamic Updates in the Domain Name System (DNS UPDATE)' defines the protocol.

10
  • if they exists within AD as a servers / linux machines, and they are in directory, and most importantly if you didn't forgot to click "Enable DNS dynamic updates...." within scope window of DNS that shouldn't be a problem.
    – Michal
    Jun 14, 2016 at 13:50
  • No, boxes are 100% user controlled. They are not defined on our AD, 'dynamic updates' (usecured) is enabled on DNS Sever. This are on our 'intranet' so no (major) security issues.
    – fcm
    Jun 14, 2016 at 13:57
  • ok, bare with me for a minute, it might be just a temporary thing if you have set trusted zones, then just make manual entry with A record + PTR for those two and problem solved. Other than this work through zoning within DNS because by default ad's dns won't let that thing going on....
    – Michal
    Jun 14, 2016 at 14:01
  • Not the answer I'm expecting. Of course I can manually enter one or more DNS records via GUI or DNSCMD, then, why I'm asking here? I want this to be automatic with no manual intervention.
    – fcm
    Jun 14, 2016 at 14:08
  • 1
    OK, I missed the part about these being assigned static ip addresses. Aside from that, the simple fact of the matter is that if you want the clients to register in your DNS zone then they must have a DNS suffix that matches that DNS zone.
    – joeqwerty
    Jun 15, 2016 at 11:21

1 Answer 1

17

Actually, there is a utility named nsupdate that follows the protocol and provide what I was looking for. On Debian and Ubuntu, nsupdate defined as 'nsupdate is the little-known brother of nslookup'

You can add and delete 'a', 'aaaa', 'cname' and perhaps other records.

It's important to remind that your DNS server need to be 'open' and to accept dynamic updates. Due the fact that you can add any arbitrary IP address and delete legal entries, dynamic updates makes your DNS server a very insecure source of information! however, cool!

sample

nsupdate
update add xxx.yyy.com. 600 a 10.11.12.13
update delete www.example.com cname
update delete www1.example.com a
update add xxx.yyy.com 600 a 10.11.12.13
update add aaa.yyy.com  600 cname xxx.yyy.com.
send
1
  • Just wanted to point out that this is not automatic. The difference between this and sitting at the DHCP server, is that this is initiated from a remote host. Additionally, in modern, secured networks, the DNS server will NOT be open to dynamic updates.
    – Jeter-work
    Jul 6, 2022 at 14:37

You must log in to answer this question.

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