Questions tagged [nslookup]

61 questions
70
votes
2 answers

dig vs nslookup

Why do the commands dig and nslookup sometimes print different results? ~$ dig facebook.com ; <<>> DiG 9.9.2-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6625 ;; flags: qr rd ra;…
pylover
  • 3,328
  • 6
  • 21
  • 26
16
votes
3 answers

How can it be that ssh somename works, while nslookup somename does not?

How to know the IP address of some host somename I can ssh to? If I do nslookup on this host it says "no answer". How can ssh resolve it's name then? Neither /etc/hosts nor .ssh/config explanation worked. EDIT Sorry somename is fully…
Dims
  • 3,181
  • 9
  • 49
  • 107
13
votes
4 answers

Resolving hostname takes 5 seconds

I've a master bind9 DNS server and 2 slave servers running on IPv4 (Debian Jessie), using /etc/bind/named.conf: listen-on-v6 { none; }; When I try to connect from different server(s) each connection takes at least 5 seconds (I'm using Joseph's…
Tombart
  • 2,630
  • 5
  • 26
  • 39
7
votes
2 answers

Retrieve IPv6 address of website using terminal

Both the nslookup and host commands return IPv4 addresses only. How can i retrieve the IPv6 address of a website using the terminal? (I have googled around, unfortunately I couldn't find anything useful)
olfek
  • 711
  • 3
  • 7
  • 20
6
votes
2 answers

dig / nslookup cannot resolve, but ping can

I'm experimenting with a Win10 IoT board that runs a web interface on minwinpc.local. This works fine in the browser, and also when I use ping. However, when I use dig or nslookup, I cannot get resolve working. How can ping and the browser possibly…
Etan
  • 183
  • 1
  • 6
6
votes
1 answer

dig does not resolve unqualified domain names, but nslookup does

I have a lab set up with DNS running on a CentOS7 server (dns01.local.lab). The local.lab domain is defined in named.conf: zone "local.lab" IN { type master; file "local.lab.zone"; allow-update { none; }; }; I also have a reverse zone…
theillien
  • 1,308
  • 4
  • 15
  • 34
4
votes
2 answers

Universal way to check if "docker.for.mac.localhost" DNS name is resolvable?

Preface I want to write a universal shell-script which will add a proper IP address of docker host machine to /etc/hosts inside of container. You will probably advice me to put the service I want to access in another docker container too but for…
Kirill
  • 985
  • 3
  • 10
  • 20
3
votes
1 answer

What is meant by "OS resolver libraries" that are used by the "dig" command?

I know that dig queries the DNS server in the /etc/resolv.conf but I read that the difference between dig and nslookup is that dig uses OS resolver libraries. But what are the OS resolver libraries?
3
votes
1 answer

DNS issues on a single Wifi - Linux Mint 19.1

I'm having DNS problems with one WiFi network which I've been using for a long time. I tried to do an hotspot with my phone and everything worked as normal, so the issue is only on that network. ping 8.8.8.8 works, but nslookup google.com ;; Got…
Mabri
  • 111
  • 2
  • 10
3
votes
1 answer

nslookup: return only IP address

My research indicated nslookup was never really intended for scripted use: use dig instead, which with the +short option produces machine-readable output according to the query parameters. dig +short myip.opendns.com @resolver1.opendns.com That…
gatorback
  • 1,216
  • 20
  • 44
3
votes
2 answers

Why does nslookup fail for DNS records set to a private address?

Setup On some networks I'm able to use nslookup to resolve a domain name that is pointed to a private ip address: @work> nslookup my192.ddns.net Server: 10.1.2.3 Address: 10.1.2.3#53 Non-authoritative answer: Name: my192.ddns.net Address:…
cwd
  • 44,479
  • 71
  • 146
  • 167
3
votes
3 answers

How to see the actual nameservers of a domain instead of the "nsrecords"

A domain has nameservers and ns records. These should not, but can theoretically be different. There are multiple ways to see the ns records of a domain: dig: ➜ ~ dig +short NS…
Daniele D
  • 125
  • 2
  • 13
2
votes
0 answers

Inconsistent nslookup behaviour

When I run nslookup google.com 192.168.190.81 it works. tcpdump -n -vv output during above command is: 18:12:24.815483 IP (tos 0x0, ttl 64, id 8975, offset 0, flags [none], proto UDP (17), length 56) 192.168.190.85.50601 > 192.168.190.81.53:…
Eli Finkel
  • 121
  • 2
2
votes
1 answer

Ping 'Name or service not known' how can I clear cache

For several days now, after several reboots I still am faced with the issue of my CentOS 7 machine not being able to ping my domain. [root@ip126 ~]# ping sub.mydomain.eu ping: sub.mydomain.eu: Name or service not known How am I able to clear…
masterq
  • 151
  • 1
  • 1
  • 10
2
votes
1 answer

nslookup awk to a file showing "answer"

I am currently running a script that uses nslookup on a bunch of hosts and then uses awk to print desired lines into a table. I am printing one line to file1 and another to file2, then using paste file1 file2 >> file3 to produce this table. The…
1
2 3 4 5