TrueNAS NFS firewall friendly

January 06, 2024

Since this will be such a short article, no since in wasting time with the overview/conclusion.

NFS server settings

By default, the NFS server in TrueNAS uses random ports for mountd and rpc. This can make it difficult to setup firewall rules for controlling access to NFS on TrueNAS. Fortunately, this is an easy fix. Simply navigate to System Settings -> Services -> then click the pencil at the end of the NFS row. This will take you to the configuration page for the NFS service. Here, you’ll be able to set static ports for mountd, rpc.statd, and rpc.lockd. Once those are set, they can be used in the firewall rule along with ports 111 and 2049. This will allow better control over access to ports on the TrueNAS server.