Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2009 23:25:31 +0100
From:      Max Laier <max@love2party.net>
To:        freebsd-arch@freebsd.org
Cc:        Tim Kientzle <kientzle@freebsd.org>, Robert Watson <rwatson@freebsd.org>, Julian Elischer <julian@elischer.org>, Rick Macklem <rmacklem@uoguelph.ca>
Subject:   Re: getting a callback ip address for nfsv4 client
Message-ID:  <200904130025.31771.max@love2party.net>
In-Reply-To: <49E25816.9010907@freebsd.org>
References:  <Pine.GSO.4.63.0903301733120.17182@muncher.cs.uoguelph.ca> <Pine.GSO.4.63.0904121515220.27116@muncher.cs.uoguelph.ca> <49E25816.9010907@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 12 April 2009 23:07:34 Tim Kientzle wrote:
> > The second brings up the question of NAT, which I know diddly about.
> > (I vaguely thought that neither rtalloc() nor getsockaddr() would work,
> > since they would return 192.168.x.x and you really need the address
> > assigned by the isp?) Can someone help w.r.t. what address to use
> > when behind a NAT?
>
> In general, the client doesn't know what address to use
> in this case.  In fact, I've been a little confused by this
> conversation all along.  It sounds like the client is
> looking up it's own address in order to tell the server
> how to contact the client?  Why?  The server already
> knows the source IP address on the incoming packets
> from the client; that's much more robust than anything
> the client could look up.

Well, the client also needs to listen at the address - that is a local 
decision.  This is much like the problem with active mode FTP - and it has the 
same problems with NAT (i.e. the NAT service must be aware of the protocol and 
translate the address inside).  The alternative is to use things like UPnP to 
retrieve an external address mapping ... there are libraries to deal with 
that.

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904130025.31771.max>