Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm experiencing some DNS issues on a new RHEL 6 virtual machine. Ping is working fine to an IP, but the machine is unable to resolve any names. I've tried adding Google's DNS servers (8.8.8.8 and 8.8.4.4) to the bottom of /etc/resolv.conf but it's not having any affect. Even manually adding items to my /etc/hosts file doesn't seem to work. Does something need to be reset? Anything else I can try?

This is the contents of my /etc/hosts file:

127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
::1            localhost localhost.localdomain localhost6 localhost6.localdomain6
209.132.181.16 download.fedoraproject.org
74.125.236.8   google.com

However I still can't nslookup or ping to google.com.

EDIT: Solved. Was a firewall issue blocking the DNS requests.

share|improve this question
    
As you solved it, you should answer your own question and marked it as the correct answer. See How to handle self-solved problems –  Huygens May 9 '12 at 8:26
add comment

1 Answer

I know this issue has been solved, but in case someone stumbles across this trying to solve a similar issue, it might help to check /etc/nsswitch.conf to make sure the hosts line contains files when adding manual entries to /etc/hosts doesn't fix it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.