Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a number of web servers on which I've set up iptables as the firewall, this is working great. However, I also have a dedicated file server running NFS and I need to firewall this machine as well. As I understand from looking around, setting up iptables with NFS can be a tricky thing. Since I can freely choose the software I run on my servers I can easily change to another firewall.

If it makes any difference, running an NFS behind a firewall, what firewall software do you recommend instead iptables?

share|improve this question

Using the stock firewall with NFS is fine; all you have to do is pin the ports. Check the NFS initscript to see if it provides/uses variables to set the ports, and if not then add the appropriate options to the commands (see the various man pages for details). Then just open the ports you've pinned them to.

share|improve this answer

When your using NFS version 3 you must use fixed port numbers (as noted above). If you need help with NFS3, just tell and i'm happy to provide you with a link to a good how-to. If you try to set up NFS version 4 is much easier, because only have to open up the TCP port 2049 on your server. iptables is just fine for this job (but i suppose this setup should be fairly easy with any other firewall too).

share|improve this answer
Thanks for that. When I run 'sudo nfsstat' on the server it outputs "Server nfs v3", so I guess that's version 3 of NFS. This is stock Ubuntu server repository stuff and I like to keep it that way. Any links to good tutorials are certainly welcome. – Luke Jul 6 '10 at 7:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.