0
This is a follow up to the question, Ping to dnsmasq's host resolvesto 127.0.0.1, because that answer doesn't work for me. It should work -- I found another one having the same answer: https://bugzilla.redhat.com/show_bug.cgi?id=470391
In both above cases, the cause was having dnsmasq's hostname listed as 127.0.0.1
in the /etc/hosts
file. But mines doesn't:
$ head -2 /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.2.100 jupiter.myhost.dyndns.org jupiter
but dnsmasq's hostname is still resolved as 127.0.0.1
:
$ nslookup jupiter
Server: 192.168.2.100
Address: 192.168.2.100#53
Name: jupiter
Address: 127.0.0.1
What's wrong?
Update:
I'm using dnsmasq as my DNS server, and I didn't put any configuration regarding dnsmasq's hostname in dnsmasq's configuration. So, regarding the A record, this is all that I know:
$ dig jupiter
; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1 <<>> jupiter
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28464
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;jupiter. IN A
;; ANSWER SECTION:
jupiter. 0 IN A 127.0.0.1
;; Query time: 1 msec
;; SERVER: 192.168.2.100#53(192.168.2.100)
;; WHEN: Wed Jan 15 22:39:19 EST 2014
;; MSG SIZE rcvd: 39
What A record for
jupiter
set in the zone file of DNS server? – VL-80 – 2014-01-16T03:38:15.190Thx. OP updated. – xpt – 2014-01-16T03:43:15.497
So, your DNS server is returning
127.0.0.1
on request to resolvejupiter
. That is whynslookup
shows127.0.0.1
. Now we need to set correct A record for namejupiter
. – VL-80 – 2014-01-16T04:03:09.880and to do that with
dnsmasq
...? – xpt – 2014-01-16T04:07:48.257Well I am not familiar with dnsmasq, but I looked at Wikipedia article about it. It looks like it just forwards data to/from real DNS server. How is your network setup? Do you have any DNS server? Or dnsmsq is only thing of this sort you have? – VL-80 – 2014-01-16T04:11:44.617