Debian : serveur NFS avec ports statiques

Boris HUISGEN October 11, 2013

administration système linux nfs iptables

# apt-get install nfs-common nfs-kernel-server portmap

# 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/modprobe.d/nfs.conf

options lockd nlm_udpport=32768 nlm_tcpport=32768
options nfs callback_tcpport=32764

Règles Iptables :

-A INPUT -i eth0 -p tcp -m state --state NEW -m multiport --dports 111,2049,32764:32769 -j ACCEPT
-A INPUT -i eth0 -p udp -m state --state NEW -m multiport --dports 111,2049,32764:32769 -j ACCEPT

See also

Linux : règles iptables minimales
Read more
Firewall Builder : template pour serveur OpenVZ
Read more
Debian : installer un firewall léger
Read more