Groups | Search | Server Info | Login | Register


Groups > comp.protocols.nfs > #6

can nfs-kernel-server of Linux bind to localhost?

From Khufu <khufu@139.com>
Newsgroups comp.protocols.nfs
Subject can nfs-kernel-server of Linux bind to localhost?
Date 2011-07-29 12:53 +0800
Organization A noiseless patient Spider
Message-ID <j0tebr$8rh$1@dont-email.me> (permalink)

Show all headers | View raw


Hello. I followed the instructions on many websites to wrap NFS4 in SSH
so that to the nfs daemon it is a local mount.

The NFS server is on a public server. Besides the option to use a
firewall, I wonder if it is possible the nfs server can be configured to
only listens to localhost, like most mysql daemon is configured to, to
enhance security.

I tried to look up manual for nfsd which says:

   -H  or  --host hostname
       specify a particular hostname (or  address)  that  NFS  requests
       will  be  accepted  on.  By  default,  rpc.nfsd  will accept NFS
       requests on all known network addresses.  Note that lockd (which
       performs file locking services for NFS) may still accept request
       on all known network  addresses.   This  may  change  in  future
       releases of the Linux Kernel.

This almost hints -H is equal to --bind of many other daemons. I added
this to the call of nfsd in /etc/init.d/nfs-kernel-server (a debian box)
and restarted the service. Result not good:

# netstat -tl | grep nfs
tcp     0   0 *:nfs                *:*                     LISTEN

where I expected

# netstat -tl | grep nfs
tcp     0   0 localhost:nfs        *:*                     LISTEN

Question is how and can nfs-kernel-server of Linux bind to localhost?

Back to comp.protocols.nfs | Previous | NextNext in thread | Find similar


Thread

can nfs-kernel-server of Linux bind to localhost? Khufu <khufu@139.com> - 2011-07-29 12:53 +0800
  Re: can nfs-kernel-server of Linux bind to localhost? "J.O. Aho" <user@example.net> - 2011-07-29 17:58 +0200
  Re: can nfs-kernel-server of Linux bind to localhost? Zhang Weiwu <zhangweiwu+Trash@realss.com> - 2011-08-18 10:32 +0800

csiph-web