I'm using dnsmasq 2.80 on ubuntu 20.04. In the configuration I set hostsdir, the files in this directory are read automatically.

If I change the IP of a host and checks the IP with the dig command, I get 2 A records, the new and the old one. If I change the IP again, I get 3 A records and so on ...

Example of the dig command:

; <<>> DiG 9.10.6 <<>> ddns.mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6174
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 4096
;ddns.mydomain.com. IN  A

ddns.mydomain.com. 0 IN A
ddns.mydomain.com. 0 IN A
ddns.mydomain.com. 0 IN A

How can i avoid the duplication of A records for the same host?

Every hint is welcome.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Oct 15, 2022 at 10:57
  • Strange that all 3 records have a TTL of zero.
    – Kate
    Commented Oct 19, 2022 at 15:50
  • @Kate TTL of zero is ok, that's the default behaviour of dnsmasq. Commented Oct 20, 2022 at 15:17


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.