nslookup įor example, if I do a reverse DNS lookup with nslookup on Linux Handbook’s server, this is the answer I get: nslookup 142.93.143.135ġ35.143.93. name =. You can do the reverse DNS lookup and search for the domain name associated with an IP address. So far, you have queried the DNS for a certain domain and got its IP address. nslookup -type=any Īnd you’ll see a consolidated output of all above commands: nslookup -type=any Īuthoritative answers can be found from: 6. You can display all the above records (that are set) in one single command using the any option. You can read about the various attributes of the SOA record here. You can query and display the SOA (Start of Authority) record with nslookup by specifying the type of query: nslookup -type=soa Ī sample output would be like this: nslookup -type=soa *** Can’t find : No answerĪuthoritative answers can be found from: 4. mail exchanger = 10 .ĭo note that sometimes, the mail server settings are not defined and in those cases, the mx query with nslookup could return an output like this: nslookup -type=mx nslookup -type=mx Ī sample output could be like this: nslookup -type=mx This determines which mail server handles the email for the domain in question. MX records in DNS specify the mail server settings for the domain name. nameserver = .Īuthoritative answers can be found from: 3.
The sample output for Linux Handbook website is: nslookup -type=ns To display just name servers, all you need to do is to specify the type of your nslookup query: nslookup -type=ns Usually, a domain has more than one name server for backup purpose. These name servers store various DNS related records. You can also display just the name servers associated with a domain with nslookup. Mostly it comes from your internet service provider’s name server. It’s because when you use nslooku, the answer is not coming directly from the name server of the server you are querying.
It means that the answer you got for your DNS query is coming for a non-authoritative source. In the output of nslookup command, you’ll often notice ‘non-authoritative answer’. The 127.0.0.53 address in the above command output is my own system’s DNS set by systemd. One of the most popular use of nslookup is to get the IP address of a website in Linux using this method. In its simplest form, without any options, nslookup returns domain name and IP address (both IPv4 and IPv6). Let me show you some examples of the nslookup command. You can use nslookup to query the DNS and get information like IP address of a website, name server, domain name etc.