Debian
apt install nfs-kernel-server portmap systemctl status nfs-server systemctl enable nfs-server systemctl status rpcbind systemctl enable rpcbind
CentOS
yum install nfs-utils libnfsidmap systemctl enable rpcbind systemctl enable nfs-server systemctl start rpcbind systemctl start nfs-server systemctl start rpc-statd systemctl start nfs-idmapd
vi /etc/exports /home/matt/DataMediaLV/Film 10.0.20.10(ro) /home/matt/DataMediaLV/Serial 10.0.20.10(ro) /home/matt/DataMediaLV/VuRecordings 10.0.20.10(rw,sync,no_root_squash) /home/matt/DataR1/Foto/Rodinne 10.0.20.10(ro)
exportfs -r exportfs -v
Centos
vim /etc/sysconfig/nfs LOCKD_TCPPORT=32803 LOCKD_UDPPORT=32769 MOUNTD_PORT=892 STATD_PORT=662
Debian
vim /etc/default/nfs-common STATDOPTS="--port 32765 --outgoing-port 32766"
vim /etc/default/nfs-kernel-server RPCMOUNTDOPTS="-p 32767"
vim /etc/default/quota RPCRQUOTADOPTS="-p 32769"
vim /etc/sysctl.d/nfs-static-ports.conf fs.nfs.nfs_callback_tcpport = 32764 fs.nfs.nlm_tcpport = 32768 fs.nfs.nlm_udpport = 32768
/etc/sysconfig/iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 2049 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 32803 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 32769 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 892 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 892 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 662 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 662 -j ACCEPT
Debian
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 2049 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 32764:32769 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 32764:32769 -j ACCEPT