7

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.

fcm
  • 398
  • 1
  • 2
  • 12
  • 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 '16 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 '16 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 '16 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 '16 at 14:08
  • `These hosts has their hostname properly configured` - Are these hosts using a DNS suffix that matches your DNS zone? – joeqwerty Jun 14 '16 at 18:29
  • @joeqwerty AFAIK DNS servers are NOT searching your LAN collecting names to include on the dns zone; the only way will be for the host to request a registration. My question is how. I know, for example, that SAMBA offer a network command to request the registration. Other protocols like Bonjour, NetBEUI and other offer similar functionality but, without dns registration. – fcm Jun 14 '16 at 20:54
  • I've been searching answers for myself, but didn't find anything that can meet my needs yet. There are command lines in -nix systems that can register with Windows-based DNS servers, you just need to create cron jobs so it runs regularly. However it requires me to disable 'secure' dynamic update, which we can't accept. If you don't mind accepting unsecure updates, just run those command lines on your -nix servers. – strongline Jun 14 '16 at 21:17
  • @fcm: I think you misunderstood what I was asking. If you have a DNS zone named `foo.com` then your DHCP clients need a DNS suffix for `foo.com` if they're to register in the `foo.com` DNS zone. That's what I'm asking you; do the client machines have a DNS suffix that matches the DNS zone that you want them to register in? – joeqwerty Jun 14 '16 at 21:45
  • @joeqwerty static IP mean no DHCP at all. So, there is no reservation on the master DHCP server, a reservation makes it 'always the same', not static IP. Also, on DHCP served client, the DNS zone is provided along with the options by the DHCP server. – fcm Jun 15 '16 at 09:34
  • 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 '16 at 11:21

1 Answers1

14

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
fcm
  • 398
  • 1
  • 2
  • 12
  • 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 06 '22 at 14:37