7

Adding 0.0.0.0/32 in /etc/exports does not seem to work. Is there some other configuration option that can be used for this?

xkcd
  • 444
  • 3
  • 7
  • 16

3 Answers3

15

Try

/filesystem      *

You might also try reading man exports, which has a set of examples at the bottom from which the above is derived. You may also wish to note that 0.0.0.0/32 means "only the IP address 0.0.0.0". It is possible that you wwanted 0.0.0.0/0, which means "any IP address", instead, but * should do as well.

MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • This gives tons of warnings – holms Mar 09 '19 at 02:07
  • In my case (Arch Linux) when using "0.0.0.0/0" in share definition and mounting on client, I got an error message "mount.nfs: access denied by server while mounting 192.168.1.59:/srv/nfs/my_share". But replacing it with "*" in share definition fixed that. – Ashark Oct 16 '20 at 08:10
2

You should also set permissions with the share:

     /folder-location *(rw,no_root_squash,no_subtree_check)    
AvremyC
  • 121
  • 1
  • `mount_nfs: can't mount /mnt/vault from 192.168.0.108 onto /Users/holms/Vault: Operation not permitted` – holms Mar 09 '19 at 02:07
0

If you do not specify a subnet restriction, then there isn't one. E.g.:

/filesystem -sec=sys,ro

Will allow anything to mount ro. Think carefully about whether you want to allow rw or root to anything on the network. (You may, but ... well, think about it first)

Sobrique
  • 3,747
  • 2
  • 15
  • 36