DMZ, NAT, SIP...

71 views
Skip to first unread message

Rodrigo Barahona

unread,
Mar 12, 2007, 11:09:52 AM3/12/07
to asterisk-es
Hola grupo... una consulta disculpando mi ignorancia...

Si mi asterisk esta en la DMZ...

1.- ¿igual tengo que hacer NAT de los puertos?
2.- ¿Las extensiones SIPde todas formas van configuradas con NAT=yes y
qualify=yes?

Eso, saludos y gracias de antemano...

Elio Rojano

unread,
Mar 12, 2007, 12:05:08 PM3/12/07
to aster...@googlegroups.com
Si lo tienes como DMZ, todos los puertos salvo los que excluyas, apuntarán a la IP que lo tengas asignado.
Las extensiones SIP externas (las que no correspondan a la red definida en el sip.conf, en el parámetro 'localnet=') sí deberán tener el parámetro 'nat=yes' y el 'externip= XX.YY.ZZ.TT' con la IP externa del servidor.


UN saludo,


El día 12/03/07, Rodrigo Barahona < rbbar...@gmail.com> escribió:

Rodrigo Barahona

unread,
Mar 12, 2007, 12:10:38 PM3/12/07
to asterisk-es
Ok, vale..
Ahora tengo el siguiente error desde mi oficina(NAT) marco al de mi
casa (NO NAT) y me dice Error 404 Not Found... que puede ser si todos
mis anexos estan en el mismo contexto????

este es el log...

Using INVITE request as basis request -
NWUyZDVmZTBiOTFhNTI5MzUwMjU5YTZiNzljMWUwYTE.
Sending to 192.168.0.24 : 5278 (NAT)
Found user '9723'
Found RTP audio format 107
Found RTP audio format 119
Found RTP audio format 0
Found RTP audio format 98
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 101
Peer audio RTP is at port 192.168.0.24:36776
Found description format BV32
Found description format BV32-FEC
Found description format iLBC
Found description format telephone-event
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x40e (gsm|ulaw|alaw|
ilbc)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
<b>Looking for 1054 in from-internal (domain XXXXXXXXXXXXXX)
Reliably Transmitting (NAT) to x.x.x.x:5278:
SIP/2.0 404 Not Found</b>
Via: SIP/2.0/UDP 192.168.0.24:5278;branch=z9hG4bK-d87543-
ea62b5233929d02b-1--d87543-;received=200.119.246.50;rport=5278
From: "Maestra"<sip:97...@aciertochile.no-ip.org>;tag=be3d4b13
To: "1054"<sip:10...@aciertochile.no-ip.org>;tag=as2088b356
Call-ID: NWUyZDVmZTBiOTFhNTI5MzUwMjU5YTZiNzljMWUwYTE.
CSeq: 2 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

On 12 mar, 12:05, "Elio Rojano" <hel...@gmail.com> wrote:
> Si lo tienes como DMZ, todos los puertos salvo los que excluyas, apuntarán a
> la IP que lo tengas asignado.
> Las extensiones SIP externas (las que no correspondan a la red definida en
> el sip.conf, en el parámetro 'localnet=') sí deberán tener el parámetro

> 'nat=yes' y el 'externip=XX.YY.ZZ.TT' con la IP externa del servidor.
>
> UN saludo,
>
> El día 12/03/07, Rodrigo Barahona <rbbarah...@gmail.com> escribió:


>
>
>
>
>
> > Hola grupo... una consulta disculpando mi ignorancia...
>
> > Si mi asterisk esta en la DMZ...
>
> > 1.- ¿igual tengo que hacer NAT de los puertos?
> > 2.- ¿Las extensiones SIPde todas formas van configuradas con NAT=yes y
> > qualify=yes?
>

> > Eso, saludos y gracias de antemano...- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Elio Rojano

unread,
Mar 13, 2007, 5:06:40 AM3/13/07
to aster...@googlegroups.com
Como puedes ver en el log que mandas, al llamar a la extensión 1054, devuelve un "Not Found".
Asegurate que esa extensión a la que llamas está registrada haciendo un 'sip show peers'.

El día 12/03/07, Rodrigo Barahona <rbbar...@gmail.com> escribió:
ea62b5233929d02b-1--d87543-;received= 200.119.246.50;rport=5278

From: "Maestra"<sip:97...@aciertochile.no-ip.org>;tag=be3d4b13
To: "1054"< sip:10...@aciertochile.no-ip.org>;tag=as2088b356
Call-ID: NWUyZDVmZTBiOTFhNTI5MzUwMjU5YTZiNzljMWUwYTE.
CSeq: 2 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

On 12 mar, 12:05, "Elio Rojano" <hel...@gmail.com> wrote:
> Si lo tienes como DMZ, todos los puertos salvo los que excluyas, apuntarán a
> la IP que lo tengas asignado.
> Las extensiones SIP externas (las que no correspondan a la red definida en
> el sip.conf, en el parámetro 'localnet=') sí deberán tener el parámetro
> 'nat=yes' y el 'externip= XX.YY.ZZ.TT' con la IP externa del servidor.

Rodrigo Barahona

unread,
Mar 13, 2007, 11:10:51 AM3/13/07
to asterisk-es
Si, efectivamente no estaba registradop.. ahora lo solucione pero se
produjo un nnuevo problema...

No escucho nada y tampoco me escuchan. Pase mi asterisk a la DMZ
justamente para resolver este error pero sigue igual ¿no se supone que
al estar en la DMZ todos los puertos estan "visibles" desde internet?.
Agradeceria ayuda

On 13 mar, 05:06, "Elio Rojano" <hel...@gmail.com> wrote:
> Como puedes ver en el log que mandas, al llamar a la extensión 1054,
> devuelve un "Not Found".
> Asegurate que esa extensión a la que llamas está registrada haciendo un 'sip
> show peers'.
>

> El día 12/03/07, Rodrigo Barahona <rbbarah...@gmail.com> escribió:

> > ea62b5233929d02b-1--d87543-;received=200.119.246.50;rport=5278
> > From: "Maestra"<sip:9...@aciertochile.no-ip.org>;tag=be3d4b13
> > To: "1054"<sip:1...@aciertochile.no-ip.org>;tag=as2088b356


> > Call-ID: NWUyZDVmZTBiOTFhNTI5MzUwMjU5YTZiNzljMWUwYTE.
> > CSeq: 2 INVITE
> > User-Agent: Asterisk PBX
> > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> > Content-Length: 0
>
> > On 12 mar, 12:05, "Elio Rojano" <hel...@gmail.com> wrote:
> > > Si lo tienes como DMZ, todos los puertos salvo los que excluyas,
> > apuntarán a
> > > la IP que lo tengas asignado.
> > > Las extensiones SIP externas (las que no correspondan a la red definida
> > en
> > > el sip.conf, en el parámetro 'localnet=') sí deberán tener el parámetro

> > > 'nat=yes' y el 'externip=XX.YY.ZZ.TT' con la IP externa del servidor.


>
> > > UN saludo,
>
> > > El día 12/03/07, Rodrigo Barahona <rbbarah...@gmail.com> escribió:
>
> > > > Hola grupo... una consulta disculpando mi ignorancia...
>
> > > > Si mi asterisk esta en la DMZ...
>
> > > > 1.- ¿igual tengo que hacer NAT de los puertos?
> > > > 2.- ¿Las extensiones SIPde todas formas van configuradas con NAT=yes y
> > > > qualify=yes?
>
> > > > Eso, saludos y gracias de antemano...- Ocultar texto de la cita -
>

> > > - Mostrar texto de la cita -- Ocultar texto de la cita -

Rodrigo Barahona

unread,
Mar 15, 2007, 5:25:10 PM3/15/07
to asterisk-es
Alguna idea... tengo mi server en la DMZ, con esto asumo que los
puertos necesarios estan visibles para ambos lados. En el firewall de
mi router tengo permitido todo lo que llegue desde el 10000 al 20000
UDP pero cuando llamo y salgo por un trunk sip cuando el telefono PSTN
contesta a mi se me corta....

Este es el debug.. agradezco la ayuda...

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Length: 0


--- (10 headers 0 lines)---
asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK46733105;received=190.45.228.13;rport=63289
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 103 INVITE
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Length: 0


--- (10 headers 0 lines)---
asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK46733105;received=190.45.228.13;rport=63289
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 103 INVITE
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Type: application/sdp
Content-Length: 239

v=0
o=root 1011 1011 IN IP4 200.24.227.34
s=session
c=IN IP4 200.24.227.34
t=0 0
m=audio 19260 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

--- (11 headers 11 lines)---
Found RTP audio format 18


Found RTP audio format 101

Peer audio RTP is at port 200.24.227.34:19260
Found description format G729
Found description format telephone-event
Capabilities: us - 0x100 (g729), peer - audio=0x100 (g729)/video=0x0
(nothing), combined - 0x100 (g729)


Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)

asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK46733105;received=190.45.228.13;rport=63289
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 103 INVITE
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Length: 0


--- (10 headers 0 lines)---
asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK46733105;received=190.45.228.13;rport=63289
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 103 INVITE
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Length: 0


--- (10 headers 0 lines)---
12 headers, 0 lines
Reliably Transmitting (NAT) to 200.24.227.34:5060:
OPTIONS sip:ast1.tecnoera.net SIP/2.0
Via: SIP/2.0/UDP 190.45.228.13:5060;branch=z9hG4bK09d3ccb4;rport
From: "Unknown" <sip:Unk...@190.45.228.13>;tag=as246fed6d
To: <sip:ast1.tecnoera.net>
Contact: <sip:Unk...@190.45.228.13>
Call-ID: 768907652ab99e43...@190.45.228.13
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 15 Mar 2007 21:21:21 GMT


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


---
asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK09d3ccb4;rport;received=190.45.228.13
From: "Unknown" <sip:Unk...@190.45.228.13>;tag=as246fed6d
To: <sip:ast1.tecnoera.net>;tag=as0df127d9
Call-ID: 768907652ab99e43...@190.45.228.13
CSeq: 102 OPTIONS
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Accept: application/sdp
Content-Length: 0


--- (10 headers 0 lines)---
Destroying call '768907652ab99e43...@190.45.228.13'
asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK46733105;received=190.45.228.13;rport=63289
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 103 INVITE
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Type: application/sdp
Content-Length: 239

v=0
o=root 1011 1012 IN IP4 200.24.227.34
s=session
c=IN IP4 200.24.227.34
t=0 0
m=audio 19260 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

--- (11 headers 11 lines)---
Found RTP audio format 18


Found RTP audio format 101

Peer audio RTP is at port 200.24.227.34:19260
Found description format G729
Found description format telephone-event
Capabilities: us - 0x100 (g729), peer - audio=0x100 (g729)/video=0x0
(nothing), combined - 0x100 (g729)


Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)

list_route: hop: <sip:0294...@200.24.227.34>
set_destination: Parsing <sip:0294...@200.24.227.34> for address/
port to send to
set_destination: set destination to 200.24.227.34, port 5060
Transmitting (NAT) to 200.24.227.34:5060:
ACK sip:0294...@200.24.227.34 SIP/2.0
Via: SIP/2.0/UDP 190.45.228.13:5060;branch=z9hG4bK3e6aefd5;rport
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Contact: <sip:47...@190.45.228.13>
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 103 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


---
Scheduling destruction of call
'1b7e826442c79dad...@ast1.tecnoera.net' in 32000 ms
set_destination: Parsing <sip:0294...@200.24.227.34> for address/
port to send to
set_destination: set destination to 200.24.227.34, port 5060
Reliably Transmitting (NAT) to 200.24.227.34:5060:
BYE sip:0294...@200.24.227.34 SIP/2.0
Via: SIP/2.0/UDP 190.45.228.13:5060;branch=z9hG4bK4169fc4b;rport
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Contact: <sip:47...@190.45.228.13>
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 104 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Proxy-Authorization: Digest username="4708", realm="asterisk",
algorithm=MD5, uri="sip:0294...@200.24.227.34", nonce="5c109017",
response="93e91b1ec13469ecee22e5bd1be1567a", opaque=""
Content-Length: 0


---
asterisk1*CLI>
<-- SIP read from 200.24.227.34:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
190.45.228.13:5060;branch=z9hG4bK4169fc4b;received=190.45.228.13;rport=63289
From: "2673690" <sip:47...@ast1.tecnoera.net>;tag=as22a142ba
To: <sip:0294...@ast1.tecnoera.net>;tag=as629b8131
Call-ID: 1b7e826442c79dad...@ast1.tecnoera.net
CSeq: 104 BYE
User-Agent: TECNOERA VoIP PBX


Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Contact: <sip:0294...@200.24.227.34>
Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing


--- (11 headers 0 lines)---
Destroying call '1b7e826442c79dad...@ast1.tecnoera.net'
Destroying call '0e9aaf4c3cc5c173...@127.0.0.1'
asterisk1*CLI> sip no debug
SIP Debugging Disabled
asterisk1*CLI>

Reply all
Reply to author
Forward
0 new messages