[asterisk-users] Why Nat=yes Nat=no Option?

Alex Balashov abalashov at evaristesys.com
Thu Nov 13 09:09:48 CST 2008


Klaus Darilion wrote:

> Actually I would nat=yes always, even if clients are not behind NAT os 
> otherwise the clietn can put some garbage into the contact header (e.g. 
> IP address of an upstream provider) and influence routing.

No.  There is a specific reason RFC 3261 says:

    "Registration creates bindings in a location service for a particular
    domain that associates an address-of-record URI with one or more
    contact addresses.  Thus, when a proxy for that domain receives a
    request whose Request-URI matches the address-of-record, the proxy
    will forward the request to the contact addresses registered to that
    address-of-record."

This gives the UAC the necessary level of control to determine how it is 
to be contacted.

Imagine, for a example, a scenario in which incoming registrations are 
proxied further upstream for whatever reason - load balancer/distributor 
perhaps? - by an intermediate element.  Do you really want to use that 
proximate hop's received IP address in place of the ultimate sending 
UAC's domain?

-- Alex

-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list