No DNS server setting in resolv.conf with Fedora 15

After a clean install of Fedora 15 and an upgrade to apply all current fixes, you may find that your network connection successfully receives a DHCP reply, complete with DNS server, but you are unable to resolve domain names.

Conditions and symptoms are:

  • You are using Network Manager (e.g. under Gnome 3)
  • Your network connection shows as “connected” in Gnome “System Settings”, “Network” and displays an IP address, Default Route and one, or more DNS servers.
  • You can successfully ping external addresses in a terminal session:
    e.g. ping –c 3 8.8.8.8
  • DNS lookups fail:
    e.g. nslookup www.google.com.
  • You may see an SELinux AVC denial alert under Gnome.
  • The file /etc/resolv.conf.tmp exists and contains a valid DNS server IP within.
  • /var/log/messages contains the following:
    • <warn> could not commit DNS changes … Permission denied
    • setroubleshoot: SELinux is preventing NetworkManager from unlink access on the file /etc/resolv.conf

To fix this:

Open a Terminal window session and type:

su –
<enter your password>
restorecon /etc/resolv.conf

Now disable and re-enable your network connection from the Gnome network tray icon and re-test DNS lookups by either opening up a browser and navigating to any page, or by using nslookup in a terminal window.

Advertisement

2 Responses

  1. Thanks, really helpful!! I had to restart the whole system, but it fixed my problem.

  2. Thanks, you realley helped me – I was already planning to replace Fedora with another distro…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.