Nslookup showing hostname, but DIG is not
-
If I run nslookup, it shows the hostname
[user@PCName~]$ nslookup x.x.x.75 ;; Got recursion not available from x.x.x.167, trying next server x.x.x.172.in-addr.arpa name = hostname.mydomain.org.If I run dig, it does not
[user@PCName~]$ dig -x x.x.x.75 ; <<>> DiG 9.11.4-RedHat-9.11.4-1.fc28 <<>> -x x.x.x.75 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 22718 ;; flags: qr rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ; COOKIE: ee9af342770eded1 (echoed) ;; QUESTION SECTION: ;x.x.x.172.in-addr.arpa. IN PTR ;; Query time: 0 msec ;; SERVER: x.x.x167#53(x.x.x.167) ;; WHEN: Fri Aug 03 09:15:34 EDT 2018 ;; MSG SIZE rcvd: 66What is going on? I know it is best practice to use
digvsnslookupand I want to create my script using dig, but it is not pulling A records. -
hmmm.... looking at this again it looks like
x.x.x.167is not behaving properly.nslookupis usingx.x.x.172to resolve. Is there a way to specify this indig? -
@irj said in Nslookup showing hostname, but DIG is not:
hmmm.... looking at this again it looks like
x.x.x.167is not behaving properly.nslookupis usingx.x.x.172to resolve. Is there a way to specify this indig?dig ip @othernameserver? -
@dafyre said in Nslookup showing hostname, but DIG is not:
@irj said in Nslookup showing hostname, but DIG is not:
hmmm.... looking at this again it looks like
x.x.x.167is not behaving properly.nslookupis usingx.x.x.172to resolve. Is there a way to specify this indig?dig ip @othernameserver?Yep!
-
@dafyre said in Nslookup showing hostname, but DIG is not:
@irj said in Nslookup showing hostname, but DIG is not:
hmmm.... looking at this again it looks like
x.x.x.167is not behaving properly.nslookupis usingx.x.x.172to resolve. Is there a way to specify this indig?dig ip @othernameserver?Still not showing A record.
I am still getting
;; WARNING: recursion requested but not available -
I tried every DNS server with
digand none are working. -
@irj said in Nslookup showing hostname, but DIG is not:
I tried every DNS server with
digand none are working.What happens if you...
dig ptr ip?Reverse lookups only work if there's a PTR record for them.
-
I had the command wrong...
dig -x ipaddress -
Apparently internal PTR is not configured.