Restricting access to NFS shares can be done by restricting firewall access (iptables), or by configuring the /etc/exports file. The /etc/exports file can restrict access to a single machine, a wildcard, or an IP network.
It all starts with installing and starting NFS
- yum install nfs-utils rpcbind
- service nfs start
- service rpcbind start
- Edit /etc/exports
- Configure the export command like the following
- /media 192.168.10.10(rw,no_root_squash)
- Restart the service - service nfs restart
- Edit /etc/exports
- Configure the export command like the following
- /media *.example.com(rw,no_root_squash)
- or /media 192.168.*10(rw,no_root_squash)
- Restart the service - service nfs restart
- Edit /etc/exports
- Configure the export command like the following
- /media 192.168.10.0/24(rw,no_root_squash)
- Restart the service - service nfs restart
1 comment:
In response to these lines :
Restricting to an IP network -- this allows exporting to an entire subnet, or group of addresses
Edit /etc/exports
Configure the export command like the following
/media 192.168.10.0/24(rw,no_root_squash)
Restart the service - service nfs restart
my reply: i think the way you have written netmask is incorrect. if i am not mistaken, the correct way is ::
/media 192.168.10.0/255.255.255.0(rw,no_root_squash)
Post a Comment