1

I recently installed dnsmasq in two of my machines. The service works all right but the trouble is that when consulted they return only their loopback ip.

@Machina ~]$ nslookup continua continua
Server:     continua
Address:    192.168.1.2#53

Name:   continua.ianinus
Address: 127.0.1.1
Name:   continua.ianinus
Address: a:a:a:a:a:a:a:a

I think that it just returns what it has on its hosts file:

127.0.0.1       localhost
127.0.1.1       Continua.ianinus        Continua

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I could add its actual ip to the file but that would be useless as it's configured to be dynamic.

How do I make my computer to return its outer address (192.168.1.2) instead of loopback (127.0.0.1)?

  • I suppose that broadcast should be 255.255.255.255, anyway how should I call the ip that's not the loopback? Hate my English but I haven't noticed that "it" has a possesive in 30 years of speaking it lol. An btw I still have no response to my actual question. – Lerian Acosenossa Apr 15 '22 at 23:21
  • Most consumer routers include a DNS feature, so removing the caching DNS (`dnsmasq`) ought to be sufficient. – Jeremy Boden Apr 16 '22 at 01:56
  • Is `dnsmasq` on this machine intended to serve just itself, or is it for other machines on the LAN too? – roaima Apr 16 '22 at 07:26
  • 1
    The reason dnsmasq is returning the loopback is because by default it is driven from the hosts file. But I'm trying to understand the need so I can write you a more useful answer – roaima Apr 16 '22 at 07:51
  • @Roaima In node dns it's just decorative and not using it as a real solution except for exception cases? The need is that if I find some new machine on my network and my Central DNS doesn't know about it then I want that machine to be able to tell me what it is. – Lerian Acosenossa Apr 16 '22 at 14:10
  • I would say that nsmasq was unlikely to help with that – roaima Apr 16 '22 at 16:10
  • @roaima sure something like a hostname protocol would do better, but anyway I want to have individual dns working. – Lerian Acosenossa Apr 16 '22 at 17:13

0 Answers0