NFS : Configure NFS Server2026/04/27 |
|
Configure NFS Server to share directories on your Network. +----------------------+ | +----------------------+ | [ NFS Server ] |10.0.0.30 | 10.0.0.51| [ NFS Client ] | | dlp.srv.world +----------+----------+ node01.srv.world | | | | | +----------------------+ +----------------------+ |
|
| [1] | Configure NFS Server. |
|
root@dlp:~#
apt -y install nfs-kernel-server
root@dlp:~#
vi /etc/idmapd.conf # line 5 : uncomment and change to your domain name Domain = srv.world
root@dlp:~#
vi /etc/exports # add settings for NFS exports # for example, set [/home/nfsshare] as NFS share /home/nfsshare 10.0.0.0/24(rw,no_root_squash)
# if UFW is enabled and also you use NFSv3, fix mountd port root@dlp:~# systemctl edit nfs-mountd.service # add follows [Service] ExecStart= ExecStart=/usr/sbin/rpc.mountd -p 20048root@dlp:~# mkdir /home/nfsshare root@dlp:~# systemctl restart nfs-server
|
| [2] | If UFW is enabled, allow NFS related services. |
|
root@dlp:~#
ufw allow nfs
# to allow NFSv3, do the following root@dlp:~# ufw allow 20048/tcp root@dlp:~# ufw allow 20048/udp root@dlp:~# ufw allow 111/tcp root@dlp:~# ufw allow 111/udp
|
For basic options of exports
|
| Sponsored Link |
|
|