DNS-over-HTTPS


Just found out Google public DNS supports DNS-over-HTTPS. A single curl command can give you the result in json format. Very nice!

Syntax: curl -s https://dns.google.com/resolve?name=xxxx

curl -s https://dns.google.com/resolve?name=ap-southeast-2.aws.amazon.com | jq -r .

{
  "Status": 3,
  "TC": false,
  "RD": true,
  "RA": true,
  "AD": false,
  "CD": false,
  "Question": [
    {
      "name": "ap-southeast-2.aws.amazon.com.",
      "type": 1
    }
  ],
  "Authority": [
    {
      "name": "aws.amazon.com.",
      "type": 6,
      "TTL": 59,
      "data": "ns-921.amazon.com. root.amazon.com. 1499061428 3600 900 7776000 60"
    }
  ],
  "Comment": "Response from 34.196.62.143"
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s