[asterisk-users] Asterisk both behind a NAT and outside at the same time

Leo Ann Boon leo at datvoiz.com
Tue Oct 31 17:10:29 MST 2006


Brad Templeton wrote:
> On Tue, Oct 31, 2006 at 07:40:35PM +0800, Leo Ann Boon wrote:
>   
>>>  
>>>       
>> Have you tried setting the externalip and localnet parameters?
>>
>>     
> Localnet makes some sense, and is set (should be the default anyway, no?)
>   
I don't think it's set by default. Anyone know how we can see which 
localnets are in use from the CLI? sip show settings doesn't work even 
if I explicitly defined a localnet.
> externalip, as I understand it, is for an Asterisk which is behind
> a NAT.  This asterisk is not behind a NAT to anybody.  The
> phones are behind a NAT to the outside world but not to the
> Asterisk box, which has two ethernets on it, one for the internal
> natwork and one for the real internet.
>   
The way I understand it, externalip and localnet work hand-in-hand. I do 
agree with you that this is commonly used for Asterisk behind a NAT. I 
believe these parameter just helps asterisk determine what to do. In 
your case, you don't lose anything - the external IP would still have to 
be written into every outbound packet.

> It uses bindaddr=0.0.0.0 and listens to both addresses.  
>   
externalip doesn't affect the bindaddr.

Leo.



More information about the asterisk-users mailing list