Getting OpenSuSE to ping and resolve local hosts
Posted by: John Little
Recently I installed OpenSuSE on my notebook. It’s been awhile since I used any SuSE products but I thought since my next contract is supporting SuSE servers I should bone up on the distribution. Most things went as expected. Except that I couldn’t ping or resolve local hosts.
That’s correct. I couldn’t ping them nor could I access them via a web browser. Bummer. I access my management consoles and mp3 server through a browser.
The dig utility would resolve them ok. Just not any user or administrative applications such as those mentioned above. After doing some digging around on the web and reading some man pages I found that there two files that need to be edited, or at least checked.
Now we need to edit the /etc/nsswitch.conf and /etc/host.conf file. Note that I said the /etc/host.conf file not /etc/hosts as some people have done.
Change the /etc/nsswitch.conf hosts entry to read:
hosts: files dns
and the /etc/host.conf file to read:
.
order bind, hosts
multi off
mdns off
You may need to reboot after doing this. Now I could ping and resolve the local hosts normally.
Be careful what posts that you use to solve this or any other problem. I read one post that said if the domain ends in .local, which mine does, then this is problematic with SuSE. One poster even recommended changing the domain name. That’s right. I’m going to change the FQDN of all of my machines. Not.
The problem simply lies with the settings that SuSE ships with their products, specifically with the /etc/host.conf file. See the man page for more details. It specifically points out the use of .local domains and what to set the entries to in the file, the critical one being the mdns entry.
-j






