Ask Your Question
0

/etc/resolv.conf doesnt work

asked 2012-12-15 09:46:03 -0500

czkz6a gravatar image

hello, i have problem with my fedoras virtual machine. I installed fedora with ip from dhcp and i have changed ip to static. After this fedora cant resolve host names. I have tried to put google dns ip to /etc/resolv.conf but this dosnt work. Still the same.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-12-15 10:46:30 -0500

xconspirisist gravatar image

updated 2012-12-15 10:48:35 -0500

The correct syntax for /etc/resolv.conf is:

nameserver x.x.x.x

Where "x.x.x.x" is the IP address of your nameserver. You should test this nameserver first. Lets assume your nameserver is "192.168.0.1":

1: Ping it, to check that you can reach it.

ping 192.168.0.1

You should see responses like this;

64 bytes from 192.168.0.1: icmp_req=1 ttl=64 time=0.612 ms

Press Ctrl+C to cancel the ping.

2: Now check DNS is running on that server:

nslookup google.com 192.168.0.1

This should give you a response like;

Name:   google.com
Address: 173.194.41.67
Name:   google.com
Address: 173.194.41.68
Name:   google.com
Address: 173.194.41.69

This validates your dns configuration. Some applications, espeically Firefox and Google Chrome will cache your DNS servers, so it may be necessary to restart them to pick up changes to DNS servers.

Your changes may be overwritten by NetworkManager - which is on by default. You may find configuration of DNS servers is easier by using a graphical tool, rather than editing /etc/resolv.cof manually.

edit flag offensive delete link more

Comments

1

bonus points if you use dig instead of nslookup!

randomuser gravatar imagerandomuser ( 2012-12-16 00:59:50 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-12-15 09:46:03 -0500

Seen: 3,927 times

Last updated: Dec 15 '12