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
gefragt vor 2 Monaten172 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
Artem
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen