Skip to contentSkip to conversation

SIP vs NAT, the configuration

DISCUSSION Lorenzo Allegrucci 1 participant 2 messages Dec 17, 2009 – Dec 18, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines · François Legal

I guess yes, but most of the packets will go through the RELATED match, and depending on your setup, a lot of packets not related at all to SIP/VOIP could go through that match.

my setup:

no NAT, static routing, my soft-phones can call each other without problems. (I configured a local asterisk server just for this test)

on my router (debian lenny):
nf_conntrack_sip ports=5060 sip_direct_signalling=1 sip_direct_media=1 iptables -t mangle -A FORWARD -m helper --helper sip -j CLASSIFY --set-class 1:100

iptables -L -n -t mangle -v -x does not match all voip traffic, just some random packets. Can anyone reproduce this?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 2 lines · François Legal

Could you log the packets that match instead of marking, then send the log to the list ?

Hi François,

I just managed to solve it by setting "directmedia=update" on my asterisk configuration. If directmedia=yes RTP traffic is between the two clients, with directmedia=update almost all RTP traffic is via asterisk and in this way the nf_conntrack_sip module can match it. The sip_direct_media=[0|1] parameter of nf_conntrack_sip had no influence on my test.