DevOps Prerequisites Course - Labs DNS

How to resolve the name news to news.yahoo.com ??

@NG-Loi , You need to use vi editor here. Please see the attached screenshot.

Resolving news.yahoo.com is not possible anymore, by that neither is resolving new if we setup search to yahoo domain. Also if we ping that domain it will show request timeout. So you will receive packet loss error every time. This should be changed in the lab for google.com or similar domain.

@boriss No, the domain is still valid AFAICT:

$ dig news.yahoo.com

; <<>> DiG 9.10.6 <<>> news.yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59057
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
news.yahoo.com.		26	IN	CNAME	me-ycpi-cf.news.g06.yahoodns.net.
me-ycpi-cf.news.g06.yahoodns.net. 60 IN	A	69.147.88.8
me-ycpi-cf.news.g06.yahoodns.net. 60 IN	A	69.147.88.7

;; Query time: 16 msec
;; SERVER: 2600:1700:ab10:5cf0::1#53(2600:1700:ab10:5cf0::1)
;; WHEN: Wed Dec 13 09:47:14 PST 2023
;; MSG SIZE  rcvd: 121

$ ping news.yahoo.com
PING me-ycpi-cf.news.g06.yahoodns.net (69.147.88.8): 56 data bytes
64 bytes from 69.147.88.8: icmp_seq=0 ttl=55 time=8.727 ms
64 bytes from 69.147.88.8: icmp_seq=1 ttl=55 time=9.926 ms
64 bytes from 69.147.88.8: icmp_seq=2 ttl=55 time=8.627 ms
64 bytes from 69.147.88.8: icmp_seq=3 ttl=55 time=9.657 ms
64 bytes from 69.147.88.8: icmp_seq=4 ttl=55 time=10.038 ms
64 bytes from 69.147.88.8: icmp_seq=5 ttl=55 time=8.809 ms
64 bytes from 69.147.88.8: icmp_seq=6 ttl=55 time=9.476 ms
^C
--- me-ycpi-cf.news.g06.yahoodns.net ping statistics ---
7 packets transmitted, 7 packets received, 0.0% packet loss

Did you get this working? I have added “search yahoo.com” to resolv.config, its still failing

Check fails even after adding search in /etc/resolv.conf

I encountered the same problem

I have done what is needed to be done but yet it still fails.
Any idea why?


@rob_kodekloud

Even I am experiencing the same problem.

Step 1: open /etc/resolv.conf

sudo nano /etc/resolv.conf

Step 2: Add This Line

nameserver 8.8.8.8

Step 3: edit /etc/nsswitch.conf

hosts:      files dns

Check DNS Resolution: Ensure that your system can resolve the domain using the nslookup or dig command. For example:

nslookup news.yahoo.com

If the resolution is successful, you should see the IP address associated with “news.yahoo.com.”