Question regarding NFS

Alfred Perlstein alfred at freebsd.org
Thu Sep 25 00:47:15 UTC 2008


* Adam Stylinski <kungfujesus06 at gmail.com> [080918 17:15] wrote:
> Hello,
>       I am running an IPCop firewall for my entire network.  I have a
> wireless network device on the blue subnet which must access a freebsd NFS
> server.  In order to do this, I need to open a DMZ pinhole on a few select
> ports.  It's my understanding that NFS chooses random ports and I was
> wondering if there was a way I could fix this.  There is a good reason that
> the subnet for the wireless is separate from the wired and I'd rather not
> configure this thing over a VPN.  The client connecting to the NFS server is
> a voyage computer (pretty much a small debian).  Also, if at all possible,
> I'd like to keep performance reasonably high when large volumes of clients
> are connecting to the NFS server, I'm not sure if binding to one port may or
> may not make this impossible.  I apologize for my stupidity and lack of
> understanding when it comes to NFS.  Any help would be gladly appreciated,
> guys.

_usually_ NFS uses port 2049 on the server side.  I think the client may
bind to a random low port, this would be annoying to change, but could
be done with a kernel hack relatively easily.  Look at the code in
src/sys/nfsclient/nfs_socket.c, there's some code that that deals with
binding sockets that you can play with.

-- 
- Alfred Perlstein


More information about the freebsd-net mailing list