0

How to allow only two ip to access nfs share

Hi, in my nfs setup, i need to allow only two IP to access the nfs shared directory. But for the first user i should give both read & write, whereas for second one only read access. How to do so...

NFS IP Address NFS (Network File System) Add a comment
james
asked Apr 25 2017

Answer

0

In exports file, you will mention a single IP or special character for full access. To give only access for two IP mention it separatly as shown below.

Here, 192.168.1.2 and 192.168.1.3 as two IPs

/Folder-to-share 192.168.1.2(rw,async)
/Folder-to-share 192.168.1.3(ro,async)

192.168.1.2 has both read & write acces

192.168.1.3 has only read

once its done, restart nfs service and execute exportfs -a command

Add a comment
jagannatharumugam
asked Apr 25 2017
edited Oct 05 2018
Post your Answer