Operating System - HP-UX
1752785 Members
6213 Online
108789 Solutions
New Discussion

Re: restricting nfs to specific server

 
SOLVED
Go to solution
EU-Admins-UNIX
Regular Advisor

restricting nfs to specific server

Hi

 

in my /etc/dfs/dfstab, I have managed to restirct the rw access to a specific server, but is there anyway of restricting the number of servers that can actually mount the file system?  i.e. as it stands, other systems can mount the FS but not write to it.

 

share -F nfs -o rw=server /opt/coins9/live
share -F nfs -o rw=server /opt/coins9/training
share -F nfs -o rw=server /opt/coins9/test1
share -F nfs -o rw=server /opt/coins9/copy1

 

I want to restrict the mounting of the FS to 'server'.

 

Regards

 

Tariq

2 REPLIES 2
Matti_Kurkela
Honored Contributor
Solution

Re: restricting nfs to specific server

From "man share":

rw=client[:client] ...

    Share the pathname read-mostly if sec= option is not provided. Read-mostly means read-write to those clients specified and read-only for all other systems. If a sec= option is provided, pathname is shared read/write only to the listed clients. No other systems can access pathname.

 

In other words, you'll need to share your filesystems like this:

share -F nfs -o sec=sys,rw=server /opt/coins9/live
[...]

 

MK
EU-Admins-UNIX
Regular Advisor

Re: restricting nfs to specific server

Thanks MK

 

I had to refresh by typing

 

shareall

 

and now it workds a treat.

 

Thanks

 

 

Tariq