-1

This is my current /etc/exports on my freeBSD machine

/shared -alldirs 177.16.8.77

how do I share /shared with all IPs and not just 177.16.8.77 ?

1
  • Just remove the IP address. If you do not specify an address, it is shared with the world.
    – Tommiie
    May 6, 2020 at 21:24

2 Answers 2

0

From man exports (available on Debian Linux, I would be surprised if it's not on freeBSD):

Machine Name Formats
   NFS clients may be specified in a number of ways:
   [...]
   wildcards
          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, *.cs.foo.edu matches all hosts in the domain
          cs.foo.edu. As these characters also match the dots in a
          domain name, the given pattern will also match all hosts
          within any subdomain of cs.foo.edu.

So use * to export a directory to all possible hosts. Perhaps omitting the host specification altogether will work on freeBSD, according to some sources.

0

Do you really mean all IPs? Not very secure!

To share with your network, do it like this:

/shared -alldirs -network 177.16.0.0/16  

or

/shared -alldirs -network 177.16.0.0 -mask 255.255.0.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.