Configuring NFS under Linux for IPTABLES control


When setting up IPTABLES firewalling for Linux systems running the NFS service (network file system), you hit the problem that some of the TCP/IP and UDP ports used by components of the service are randomly generated as part of the “SunRPC” mechanism.

This HOWTO document is part of the LinWiz tool kit, and describes how to set up NFS on your server in such a way that meaningful IPTABLES firewall rules can be applied to the system.

Viewing the used ports.
On a system that is up and running with the NFS service active, the ports used by the components of the service can be listed using the command “rpcinfo -p”. The output will look something like this...

Read more here