Binding ports for NFS

Justin Willmert justin at jdjlab.com
Sun Dec 18 22:53:37 UTC 2005


Thomas Cameron wrote:

>On Thu, 2005-12-15 at 23:56 -0500, redhatdude at bellsouth.net wrote:
>  
>
>>Hi,
>>Let's see if I have more luck with this question and somebody answers  
>>it.
>>I'm trying to share a folder using NFS. The problem I'm having is  
>>with the ports some of the daemons use and the firewall. The ports  
>>for portmapper and nfsd remain the same all the time and I can open  
>>them in the firewall. However, daemons such as lockd and mountd  
>>change every time I load the nfs service. What I'd like to do is bind  
>>these daemos to a specific port that would remain open in the  
>>firewall. How can I accomplish that?
>>Thanks a lot for any help,
>>EJ
>>    
>>
>
>Have a look at http://www.novaglobal.com.sg/?q=node/68 for some good
>info on forcing various NFS daemons to use specific ports.
>
>TC
>
>  
>
I haven't been following this thread, so if what I say contridicts to 
something you've already said, I am sorry, but I thought you might like 
to hear what I did.

When I first set up NFS, I set it us using version 3 which meant I 
needed to lock down statd, lockd, quotad, and mountd. I did that and 
then I'd mount the directory. The problem I had was, though, that my 
connection would for some reason drop and everything would hang 
(probably something to do with connecting to the server through a 
firewall on different subnet). Anyway I started investigating into 
version 4 of NFS. That helped out a lot. Now my connection never drops 
out. The advantage was that instead of having ports open for every 
program, NFSv4 has been worked so I only need portmap (111) and NFS 
(2049) ports open.

I can't seem to find the webpage I used to set it up (uh-oh for me later 
;-)) or else I'd give you the link, so just google around for 
information about NFSv4. One hint I'll say is most pages say you can 
either use the type 'nfs4' or the option 'version=4' when mounting the 
NFSv4 share. It seems in Fedora at least that you can only use the 
'nfs4' type...'version=4' option never worked for me.

Hope this helps,
Justin Willmert




More information about the users mailing list