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 have my nfs server running on box, and I have my /etc/exports configured using

/myshare 192.168.1.*(rw,sync,no_subtree_check)

I was able to mount nfs from client box.

However I was unable to mount from! ("mount.nfs mount(2) permission denied" followed by "mount.nfs access denied by server while mounting")

Then I found that I can make connection if I change client's ip to

Finally, I was able to make it work by using instead of 192.168.1.*

Could anybody explain why works for, but 192.168.1.* does not?


... I'm not an administrator, and I have weak understanding of subnets... Ubuntu64, 12.04...

share|improve this question
up vote 1 down vote accepted

Please refer to the manpage of exports(5):

Machine Name Formats
NFS clients may be specified in a number of ways:


IP networks
    You  can  also  export  directories  to  all hosts on an IP (sub-) network
    simultaneously. This is done by specifying an IP address and netmask  pair
    as  address/netmask  where  the netmask can be specified in dotted-decimal
    format,  or  as  a  contiguous   mask   length.    For   example,   either
    `/'  or  `/22'  appended  to  the  network  base IPv4 address
    results in identical subnetworks with 10 bits of host. [...]
    Wildcard characters generally  do  not  work on IP addresses, though they
    may work by accident when reverse DNS lookups fail.

    Machine names may contain the wildcard characters * and ?, or may  contain
    character  class lists within [square brackets].  This can be used to make
    the exports file more compact;  for  instance,  *  matches  all
    hosts  in  the domain  As these characters also match the dots
    in a domain name, the given pattern will also match all hosts  within  any
    subdomain of

This simply means you're configuring it wrong in the line

/myshare 192.168.1.*(rw,sync,no_subtree_check)

Wildcards can be used in hostnames, for specifying IP networks, you need to use dotted-decimal IP addresses and an optional subnet size. The reverse IP-lookup story above could explain why it worked for a specific address.

share|improve this answer
192.168.1.* worked for, nslookup returns server can't find NXDOMAIN (run on NFS server). Same thing with – Yevgen Yampolskiy Dec 11 '12 at 12:21
Also 192.168.1.* worked for – Yevgen Yampolskiy Dec 11 '12 at 12:21
'may work by accident' is a strange wording – Yevgen Yampolskiy Dec 11 '12 at 12:24
You're hitting undefined behaviour by not following documentation. Besides, nslookup is not the same as standard libc resolving (e.g. does not use /etc/hosts). – gertvdijk Dec 11 '12 at 12:29

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.