CompTIA Linux+ (XK0-005) — Question 212
A Linux administrator is troubleshooting an issue in which users are not able to access https://portal.comptia.org from a specific workstation. The administrator runs a few commands and receives the following output:
# cat /etc/hosts
10.10.10.55 portal.comptia.org
# host portal.comptia.org
portal.comptia.org has address 192.168.1.55
#cat /etc/resolv.conf
nameserver 10.10.10.5
Which of the following tasks should the administrator perform to resolve this issue?
Answer options
- A. Update the name server in resolv.conf to use an external DNS server.
- B. Remove the entry for portal.comptia.org from the local hosts file.
- C. Add a network route from the 10.10.10.0/24 to the 192.168.0.0/16.
- D. Clear the local DNS cache on the workstation and rerun the host command.
Correct answer: B
Explanation
The correct answer is B because the entry in the local hosts file is causing a conflict with the DNS resolution. The hosts file entry points to an incorrect IP address (10.10.10.55) instead of the valid one (192.168.1.55) returned by the DNS query. The other options do not address the root cause of the issue related to the hosts file entry.