> For the complete documentation index, see [llms.txt](https://taqiyeddine.gitbook.io/exploring-it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://taqiyeddine.gitbook.io/exploring-it/lpic-2-linux-engineer-202-450/lpic-2-linux-professional/nfs-network-file-system/limiting-user-permissions.md).

# Limiting User Permissions

NFS Permissions

&#x20;rw and ro rw: Allow read and write access

&#x20;ro: Allow read-only access&#x20;

squash root\_squash: Treat root users as anonymous.&#x20;

no\_root\_squash: Allow root users to connect with elevated privileges.&#x20;

all\_squash: Treat all users as anonymous.

**USING TCP WRAPPER:** it gives you one consistant way to  restrict acces by filtering the ip address for any service like ssh etc not only nfs\
You have to know the service name, for NFS the rpcbind is what actually doing the connection

* rpcbind includes libwrap.so&#x20;
* Allows controlling TCP connections&#x20;
* TCP Wrapper Lists

&#x20;`/etc/hosts.allow`

&#x20;`/etc/hosts.deny`

* &#x20;Allow is applied first&#x20;
* Configuring&#x20;

In /etc/hosts.allow

&#x20;`rpcbind: 10.0.222.*`&#x20;

In /etc/hosts.deny&#x20;

`rpcbind: ALL`
