linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NFS and firewalls
@ 2010-12-27 23:32 Jeff Hanson
  2010-12-28  0:12 ` Trond Myklebust
  2010-12-28  3:26 ` Jim Rees
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Hanson @ 2010-12-27 23:32 UTC (permalink / raw)
  To: Linux NFS

The random port usage of NFS makes it difficult to use with NAT/firewalls.

The common workaround is to configure statd, mountd, lockd, and quotad
to static ports. Since there isn't any standard (IANA registered) port
assignments this breaks on many networks that use dynamic or different
static ports.

This makes it difficult to use the "standard" network file sharing
protocol with mobile devices which often use firewalls.

Saned, Samba (netbios), and FTP all have conntrack modules to handle
dynamic port usage.  Has there been any attempt to write one for NFS?

I filed a bug with Ubuntu about it (#688446), mostly for psychological
benefit as it's probably something they're not going to get involved
with.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NFS and firewalls
  2010-12-27 23:32 NFS and firewalls Jeff Hanson
@ 2010-12-28  0:12 ` Trond Myklebust
       [not found]   ` <1293495170.9774.7.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
  2010-12-28  3:26 ` Jim Rees
  1 sibling, 1 reply; 4+ messages in thread
From: Trond Myklebust @ 2010-12-28  0:12 UTC (permalink / raw)
  To: Jeff Hanson; +Cc: Linux NFS

On Mon, 2010-12-27 at 18:32 -0500, Jeff Hanson wrote:
> The random port usage of NFS makes it difficult to use with NAT/firewalls.
> 
> The common workaround is to configure statd, mountd, lockd, and quotad
> to static ports. Since there isn't any standard (IANA registered) port
> assignments this breaks on many networks that use dynamic or different
> static ports.
> 
> This makes it difficult to use the "standard" network file sharing
> protocol with mobile devices which often use firewalls.
> 
> Saned, Samba (netbios), and FTP all have conntrack modules to handle
> dynamic port usage.  Has there been any attempt to write one for NFS?
> 
> I filed a bug with Ubuntu about it (#688446), mostly for psychological
> benefit as it's probably something they're not going to get involved
> with.

Neither am I.

NFSv4.1 fully solves this problem. All connections to the server are
initiated by the client, including for callback paths. The only port
that needs to be accessible on the server side is port 2049.

NFSv4 also solves the problem, with the one caveat that callbacks won't
work behind a NAT (which basically means you won't get delegations).

NFSv3 is the only protocol that actually has the problem you describe
above. We're working to deprecate it...

Cheers
  Trond


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NFS and firewalls
       [not found]   ` <1293495170.9774.7.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
@ 2010-12-28  2:58     ` Jeff Hanson
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Hanson @ 2010-12-28  2:58 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Linux NFS

On Mon, Dec 27, 2010 at 7:12 PM, Trond Myklebust
<trond.myklebust@fys.uio.no> wrote:
> NFSv4.1 fully solves this problem. All connections to the server are
> initiated by the client, including for callback paths. The only port
> that needs to be accessible on the server side is port 2049.
>
> NFSv4 also solves the problem, with the one caveat that callbacks won't
> work behind a NAT (which basically means you won't get delegations).
>

Thanks.  I made a note in the Ubuntu bug report.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NFS and firewalls
  2010-12-27 23:32 NFS and firewalls Jeff Hanson
  2010-12-28  0:12 ` Trond Myklebust
@ 2010-12-28  3:26 ` Jim Rees
  1 sibling, 0 replies; 4+ messages in thread
From: Jim Rees @ 2010-12-28  3:26 UTC (permalink / raw)
  To: Jeff Hanson; +Cc: Linux NFS

Jeff Hanson wrote:

  The random port usage of NFS makes it difficult to use with NAT/firewalls.

Assuming you mean v3, I've done this by setting nolock in the mount options
and bypassing the mount protocol by configuring the root file handle on the
client manually.

Others have noted that v4 solves this problem.  IPv6 eliminates the need for
NAT, if your client and server support it and your network will pass the
packets.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-28  3:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-27 23:32 NFS and firewalls Jeff Hanson
2010-12-28  0:12 ` Trond Myklebust
     [not found]   ` <1293495170.9774.7.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-12-28  2:58     ` Jeff Hanson
2010-12-28  3:26 ` Jim Rees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).