Forrest logo
back to the kdig tool

kdig:tldr:a1fff

kdig: Lookup the IP(s) associated with a hostname (A records) using DNS over HTTPS (DoH).
$ kdig -d @${1-1-1-1} +https +tls-hostname=${1dot1dot1dot1-cloudflare-dns-com} ${example-com}
try on your machine

This command is being used to perform a DNS lookup using the kdig tool. Let's break down the different components:

  • kdig: It is a command-line tool used for performing DNS queries.
  • -d: This flag is used to enable debug mode, which provides more detailed information about the query process.
  • @${1-1-1-1}: The @ symbol specifies the DNS server to which the query will be sent. In this case, it is using a variable (${1-1-1-1}) which likely holds the IP address of the DNS server to query. The value 1-1-1-1 is a placeholder that might be replaced with an actual IP address.
  • +https: This option instructs kdig to use HTTPS for the communication with the DNS server.
  • +tls-hostname=${1dot1dot1dot1-cloudflare-dns-com}: This option specifies the TLS hostname that should be used during the HTTPS connection. It uses a variable called ${1dot1dot1dot1-cloudflare-dns-com} which likely holds the hostname. Again, 1dot1dot1dot1-cloudflare-dns-com is a placeholder that might be replaced with an actual hostname.
  • ${example-com}: This is the actual domain name for which the DNS lookup is being performed. example-com is again a placeholder that might be replaced with an actual domain name.

So, when this command is executed, it will perform a DNS lookup using the specified DNS server, communicate with it over HTTPS, and query for the DNS records related to the given domain name. The debug mode will provide additional information about the query process.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the kdig tool