DNS don't resolve

0

Hello, I meet a DNS resolve error: When I "dig @aws nameserver example.com", the DNS can be resolved, But when I "dig @1.1.1.1 example.com", the status is "NXDOMAIN".

Could you please help me to handle this?

Jack
已提问 2 个月前171 查看次数
1 回答
2

My VPC CIDR is 10.0.0.0/16. so VPC DNS is 10.0.0.2. I've created an EC2 instance within the VPC and resolving works for both 1.1.1.1 and 10.0.0.2

$ dig @1.1.1.1 google.com

; <<>> DiG 9.16.42-RH <<>> @1.1.1.1 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35145
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             145     IN      A       172.253.122.139
google.com.             145     IN      A       172.253.122.113
google.com.             145     IN      A       172.253.122.101
google.com.             145     IN      A       172.253.122.138
google.com.             145     IN      A       172.253.122.102
google.com.             145     IN      A       172.253.122.100

;; Query time: 20 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Tue Mar 05 09:34:14 UTC 2024
;; MSG SIZE  rcvd: 135



$ dig @10.0.0.2 google.com

; <<>> DiG 9.16.42-RH <<>> @10.0.0.2 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38126
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             172     IN      A       172.253.63.102
google.com.             172     IN      A       172.253.63.139
google.com.             172     IN      A       172.253.63.101
google.com.             172     IN      A       172.253.63.113
google.com.             172     IN      A       172.253.63.100
google.com.             172     IN      A       172.253.63.138

;; Query time: 0 msec
;; SERVER: 10.0.0.2#53(10.0.0.2)
;; WHEN: Tue Mar 05 09:36:43 UTC 2024
;; MSG SIZE  rcvd: 135

Make sure that 1.1.1.1 is not blocked anywhere on a firewall

profile picture
专家
已回答 2 个月前
profile picture
专家
Artem
已审核 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则