Article 589TT NFSv4 - restrict access to exports by IP

NFSv4 - restrict access to exports by IP

by
supermario18b
from LinuxQuestions.org on (#589TT)
Hi everyone,

since NFSv4 needs a root share folder, I set /media/nfs_root accessible from everyone and two child folders accessible from specific IPs.
Here is my /etc/exports file:

Code:/media/nfs_root *(fsid=0,sync,no_subtree_check)
/media/nfs_root/nfs_child10 192.168.1.10(rw,sync,no_subtree_check)
/media/nfs_root/nfs_child20 192.168.1.20(rw,sync,no_subtree_check)The unexpected result (for me) is that everyone can mount the root and the child directories.
I'd like that the machine with IP 192.168.1.10 can only access the nfs_child10 folder and the machine with IP 192.168.1.20 can only access the nfs_child20 folder.

How do I have to modify the configuration file to achieve that?

Thanks in advance,

supermario18blatest?d=yIl2AUoC8zA latest?i=ghUAhUJmBFw:1qclyeBLdG8:F7zBnMy latest?i=ghUAhUJmBFw:1qclyeBLdG8:V_sGLiP latest?d=qj6IDK7rITs latest?i=ghUAhUJmBFw:1qclyeBLdG8:gIN9vFwghUAhUJmBFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments