Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't get a client to mount an NFS share that is being exported using a wildcard domain name.

Setup: The NFS server is running DNSMasq for DHCP and DNS.

the NFS export file has

/export *

the /etc/hosts on the NFS server (which is used by dnsmasq) has: phobos

If I try to mount the export from phobos the server denies the request.

but nslookup on the NFS server:

>nslookup    name =

if I change the /etc/hosts too: phobos

it works, but I feel like I shouldn't have to do this? Is the NFS server not using DNS?

share|improve this question
What's the output of getent hosts – mgorven Mar 1 '13 at 19:46
@mgorven Thanks, I think I know what you might be getting at. The /etc/hosts file was shorting DNS lookup. – Cyclone Mar 1 '13 at 19:56

I got this to work by switching my /etc/nssswitch.conf:

hosts: dns files


hosts: files dns
share|improve this answer
You don't really want to do that, it's generally expected that /etc/hosts overrides DNS. – mgorven Mar 1 '13 at 20:44
i suppose the other options is to move the list of hosts that dnsmasq uses to a file other than /etc/hosts? Seems like more work. – Cyclone Mar 1 '13 at 21:13
Yup, that's probably the way to go. – mgorven Mar 1 '13 at 21:34

Your Answer


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.