Resolve hostnames to IP
I'm able to ping external addresses, but cannot yet ping their hostnames successfully. So far I haven't configured anything related to the DNS server to use, and am wondering how to go about doing so.
Edit: It might be useful to point out that this question relates to specifying a DNS server to use in my own name resolution, such as for browsing the web, rather than creating/hosting my own DNS server for others to use.
Some tutorials have led me to believe I have to do all sorts of stuff with DNS/BIND configuration files, which seems like something a bit different than what I'm trying to do. I'm basically just trying to specify somewhere my DNS server. Does this have something to do with the ifcfg-eth0 file?
In the GUI version of RHEL I remembered being able to specify primary, secondary, and tertiary DNS servers. What's the command-line equivalent of that functionality from a RHEL (well, CentOS) without GUI?
Where would I get the address of my DNS server? Could I just put in the name of any DNS server out there on the Internet, or does it have to be provided by my ISP in particular? Pardon my ignorance, I'm just getting started.
For command line configuration, you can use:
Or just edit /etc/resolv.conf:
The values above are for the OpenDNS DNS servers, which are free to use. You can get your ISP's DNS servers from their web site, usually in the support section.
I personnally like to add 3 nameservers to my /etc/resolv.conf
First: my local DNS server (if you have one)
Second: one of my ISP's DNS (pick the fastest one)
Third: a DNS from a local university (the admins there are usually very good)
|All times are GMT -5. The time now is 11:07 PM.|