Skip to contentSkip to conversation

conntrack_sip

DISCUSSION Andrew O. Zhukov 2 participants 6 messages Mar 6, 2009 – Mar 16, 2009 netfilter

lore
Share & tools
lore
#0 lore raw

ëernel 2.6.25.14-69.fc8
iptables-1.4.1.1-1.fc8.x86_64.rpm

followed trouble:

SIP gw Fedora SipProxy ásterisk
192.168.2.24 192.168.2.1 666.666.34.46 555.555.184.13 555.555.184.13

Sip proxy without RTP proxy for not nat cusomers. It considetate SIP GW as 666.666.34.46 and do not switch on RTP proxy.

call from SIP GW to Asterisk. Dump from FedorÁ:

U 2009/03/05 21:00:11.899191 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..From: "212ua1" <sip
:[email protected]>;tag=66346232..To:
<sip:[email protected]>;tag=as41f52f95..Call-ID: [email protected]..
.....
..Contact: <sip:[email protected]>..Content-Type: application/sdp..Content-Length: 263....v=0..o=root 277
97 27797 IN IP4 555.555.184.2..s=session..c=IN IP4 555.555.184.2..t=0

---
180 Ringing without sdp
---

U 2009/03/05 21:00:20.753646 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..Record-Route: <sip:555.555.184.13;
lr=on;ftag=66346232>..From: "212ua1"
<sip:[email protected]>;tag=66346232..To: <sip:[email protected]>;tag=as41f52f95..C
all-ID: [email protected]: 31 INVITE..User-Agent:
Telegroup Ukraine..Allow: INVITE, ACK, CANCEL, OPTIO
NS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact:
<sip:[email protected]>..Content-Type: application/sd
p..Content-Length: 265....v=0..o=root 27797 27798 IN IP4
555.555.184.13..s=session..c=IN IP4 555.555.184.13..t=0 0..m=audio
29444 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 - - - -..a=ptime:20..a=sendrecv..

in the "OK" message ásterisk ip addresses in SDP changed to the ip addresses of SipProxy by sip_conntrack. I can provide DUMP from the SipProxy and the complete set of dumps for developers.

Thanks in advance.

Signature · 2 lines
Andrew O. Zhukov
Telegroup Ukraine
#1 lore raw

conntrack modules in fedora

ëernel 2.6.25.14-69.fc8
iptables-1.4.1.1-1.fc8.x86_64.rpm

Is it somehow possible to switch off conntrack modules in this configuration.

conntrack_ftp Ánd conntrack_sip possible exclude by rmod, modprobe -r lsmod don't show it. In iptables.config IPTABLES_MODULES="" Multiple reload iptables and linux itself. No result.

In any case I can access outside passive ftp and I see corrected SIP packets on the outside registar.

Any ideas?

Signature · 2 lines
Andrew O. Zhukov
Telegroup Ukraine
#2 lore raw

conntrack_sip bug

In reply to Andrew O. Zhukov

No answers from netfilter list.

I can exactly show the point where how this bug appeared include dumps from all points.

Andrew O. Zhukov пишет:

Quoted 45 lines

Кernel 2.6.25.14-69.fc8
iptables-1.4.1.1-1.fc8.x86_64.rpm

followed trouble:

SIP gw Fedora SipProxy Аsterisk
192.168.2.24 192.168.2.1 666.666.34.46 555.555.184.13 555.555.184.13

Sip proxy without RTP proxy for not nat cusomers. It considetate SIP GW as 666.666.34.46 and do not switch on RTP proxy.

call from SIP GW to Asterisk. Dump from Fedorа:

U 2009/03/05 21:00:11.899191 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..From: "212ua1" <sip
:[email protected]>;tag=66346232..To:
<sip:[email protected]>;tag=as41f52f95..Call-ID: [email protected]..
.....
..Contact: <sip:[email protected]>..Content-Type: application/sdp..Content-Length: 263....v=0..o=root 277
97 27797 IN IP4 555.555.184.2..s=session..c=IN IP4 555.555.184.2..t=0

---
180 Ringing without sdp
---

U 2009/03/05 21:00:20.753646 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..Record-Route: <sip:555.555.184.13;
lr=on;ftag=66346232>..From: "212ua1"
<sip:[email protected]>;tag=66346232..To: <sip:[email protected]>;tag=as41f52f95..C
all-ID: [email protected]: 31 INVITE..User-Agent:
Telegroup Ukraine..Allow: INVITE, ACK, CANCEL, OPTIO
NS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact:
<sip:[email protected]>..Content-Type: application/sd
p..Content-Length: 265....v=0..o=root 27797 27798 IN IP4
555.555.184.13..s=session..c=IN IP4 555.555.184.13..t=0 0..m=audio
29444 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 - - - -..a=ptime:20..a=sendrecv..

in the "OK" message Аsterisk ip addresses in SDP changed to the ip addresses of SipProxy by sip_conntrack. I can provide DUMP from the SipProxy and the complete set of dumps for developers.

Thanks in advance.

Signature · 7 lines
Andrew O. Zhukov
Telegroup Ukraine
Technical director.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Re: conntrack_sip bug

Quoted 49 lines · Andrew O. Zhukov

No answers from netfilter list.

I can exactly show the point where how this bug appeared include dumps from all points.

Andrew O. Zhukov пишет:

Quoted 43 lines

Кernel 2.6.25.14-69.fc8
iptables-1.4.1.1-1.fc8.x86_64.rpm

followed trouble:

SIP gw Fedora SipProxy Аsterisk
192.168.2.24 192.168.2.1 666.666.34.46 555.555.184.13 555.555.184.13

Sip proxy without RTP proxy for not nat cusomers. It considetate SIP GW as 666.666.34.46 and do not switch on RTP proxy.

call from SIP GW to Asterisk. Dump from Fedorа:

U 2009/03/05 21:00:11.899191 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..From: "212ua1" <sip
:[email protected]>;tag=66346232..To:
<sip:[email protected]>;tag=as41f52f95..Call-ID: [email protected]..
.....
..Contact: <sip:[email protected]>..Content-Type: application/sdp..Content-Length: 263....v=0..o=root 277
97 27797 IN IP4 555.555.184.2..s=session..c=IN IP4 555.555.184.2..t=0

---
180 Ringing without sdp
---

U 2009/03/05 21:00:20.753646 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..Record-Route: <sip:555.555.184.13;
lr=on;ftag=66346232>..From: "212ua1"
<sip:[email protected]>;tag=66346232..To: <sip:[email protected]>;tag=as41f52f95..C
all-ID: [email protected]: 31 INVITE..User-Agent:
Telegroup Ukraine..Allow: INVITE, ACK, CANCEL, OPTIO
NS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact:
<sip:[email protected]>..Content-Type: application/sd
p..Content-Length: 265....v=0..o=root 27797 27798 IN IP4
555.555.184.13..s=session..c=IN IP4 555.555.184.13..t=0 0..m=audio
29444 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 - - - -..a=ptime:20..a=sendrecv..

in the "OK" message Аsterisk ip addresses in SDP changed to the ip addresses of SipProxy by sip_conntrack. I can provide DUMP from the SipProxy and the complete set of dumps for developers.

Thanks in advance.

There's a lot of addresses in there :) Could you please point to the exact header which got rewritten incorrectly?

Also, please post the module parameters you're using when loading the SIP conntrack/NAT modules.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Re: conntrack_sip bug

Patrick McHardy пишет:

Quoted 19 lines
Quoted 18 lines · Andrew O. Zhukov

No answers from netfilter list.

I can exactly show the point where how this bug appeared include dumps from all points.

Andrew O. Zhukov пишет:

Quoted 12 lines

Кernel 2.6.25.14-69.fc8
iptables-1.4.1.1-1.fc8.x86_64.rpm

followed trouble:

SIP gw Fedora SipProxy Аsterisk
192.168.2.24 192.168.2.1 666.666.34.46 555.555.184.13 555.555.184.13

Sip proxy without RTP proxy for not nat cusomers. It considetate SIP GW as 666.666.34.46 and do not switch on RTP proxy.

call from SIP GW to Asterisk. Dump from Fedorа:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

U 2009/03/05 21:00:11.899191 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..From: "212ua1" <sip
:[email protected]>;tag=66346232..To:
<sip:[email protected]>;tag=as41f52f95..Call-ID: [email protected]..
.....
..Contact: <sip:[email protected]>..Content-Type: application/sdp..Content-Length: 263....v=0..o=root 277
97 27797 IN IP4 ___555.555.184.2_____..s=session..c=IN IP4 ___555.555.184.2_____..t=0

It's the real address of rtp stream

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

---
180 Ringing without sdp
---

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

U 2009/03/05 21:00:20.753646 555.555.184.13:5060 -> 192.168.2.24:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
555.555.184.13:5060;branch=z9hG4bK878912355;rport=1025..Record-Route: <sip:555.555.184.13;
lr=on;ftag=66346232>..From: "212ua1"
<sip:[email protected]>;tag=66346232..To: <sip:[email protected]>;tag=as41f52f95..C
all-ID: [email protected]: 31
INVITE..User-Agent: Telegroup Ukraine..Allow: INVITE, ACK, CANCEL, OPTIO
NS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact:
<sip:[email protected]>..Content-Type: application/sd
p..Content-Length: 265....v=0..o=root 27797 27798 IN IP4
______555.555.184.13___________..s=session..c=IN IP4 ___________555.555.184.13_________..t=0 0..m=audio

Here !!! You try to fix this packet. As the result inside GW send RTP to 555.555.184.13 instead 555.555.184.2

Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
   29444 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 - - - -..a=ptime:20..a=sendrecv..

in the "OK" message Аsterisk ip addresses in SDP changed to the ip addresses of SipProxy by sip_conntrack. I can provide DUMP from the SipProxy and the complete set of dumps for developers.

Thanks in advance.

There's a lot of addresses in there :) Could you please point to the exact header which got rewritten incorrectly?

I even find it in sources several minutes before send this post.

Look at nf_conntrack_sip.c
after comments
/* RTP info only in some SDP pkts */

You change SDP in outgoing and incoming packets. However, you have to do it only for outgoing. Otherwise, like in this example You'll have a trouble with RTP in connecttion over SIP Proxy without RTP Proxy.

Quoted 3 lines

Also, please post the module parameters you're using when loading the SIP conntrack/NAT modules.

Actually I do not load this module. It's default Fedora 8 package. Even if I unload module using rmod , modprobe -r etc.. it continue break packets... :(

Quoted 5 lines
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Andrew O. Zhukov
Telegroup Ukraine
Technical director.
Phone 380-44-2308228
Cell 380-67-4017256
Fax 380-44-2386027
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Re: conntrack_sip bug

Quoted 5 lines · Andrew O. Zhukov

I even find it in sources several minutes before send this post.

Look at nf_conntrack_sip.c
after comments
/* RTP info only in some SDP pkts */

Ah I see :) That version is completely out of date and known to be broken. 2.6.26 includes a rewritten version that should work fine, please try that or the 2.6.25 backport available at:

git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.25-sip.git