Domain DNS and Whois
Created: 2021-09-16 01:37:48 | Last modified: 2021-09-16 01:54:17
Access: Read | Views: 19 | Rating: +1 | Tags: domain dns
Info for domains and DNS. Instructions for using different tools for getting domain info
Domains and DNS are part of the internet. A domain will resolve to an IP address using DNS as the mechanism for doing this. For example, a when a computer looks up a TLD (Top Level Domain) domain.com it will resolve to an IP address e.g. 111.111.111.111 and the mechanism for doing this is a DNS lookup.
You can use a number of tools to accomplish this, in Windows you can use nslookup and in Linux you can use dig. We will list the commands here with different examples.
Windows
Windows already has an inbuild DNS tool so no extra configuration is required.
Commands
Basic domain resolution, gets an IP address of where the domain is pointing to.
nslookup domain.com

Select a specific DNS server to do a domain lookup on where 8.8.8.8 is DNS server you wish to use and domain.com is the domain you wish to lookup. This is useful to see whether a particular DNS server is able to resolve a domain or has the zone records loaded in.
nslookup
server 8.8.8.8
domain.com

Look up a SRV record, enter in nslookup utility by entering nslookup into a cmd prompt.
nslookup
set type=all
_autodiscover._tcp.domain.com

Linux
Firstly make sure that DIG is installed on your Linux server.
# Centos, Redhat etc use the following
sudo yum install bind-utils
sudo yum install whois
# Debian and Ubuntu, use the following
sudo apt install dnsutils
sudo apt install whois
Commands
Basic domain resolution, gets an IP address of where the domain is pointing to.
dig domain.com

Select a specific DNS server to do a domain lookup on where 8.8.8.8 is DNS server you wish to use and domain.com is the domain you wish to lookup. This is useful to see whether a particular DNS server is able to resolve a domain or has the zone records loaded in. Enter in the desired DNS server after the @ symbol in the command line.
dig domain.com @8.8.8.8

Lookup a SRV record
dig srv _autodiscover._tcp.domain.com
