getting a callback ip address for nfsv4 client

Max Laier max at love2party.net
Sun Apr 12 15:25:37 PDT 2009


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 at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News


More information about the freebsd-arch mailing list