Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Marcelo Mercio Dandrea" <marcdan@terra.com.br>
To: netfilter@lists.netfilter.org
Subject: H323 conntrack problem
Date: Mon, 15 Mar 2004 18:13:16 -0300	[thread overview]
Message-ID: <028801c40ad2$55d15a90$010a0a0a@SHINOBU> (raw)
In-Reply-To: 20040315200404.GL10272@home.manuelm.org


    Hello all,

    Im having some problems using FXS devices with the H323 conntrack
patch...
    So far, I tried two main (simulated at home) setups:

    1) First setup, works fine

   A------------B====================C

10.10.10.1       200.198.105.33           200.198.105.35

  Being A and C FXS voice boxes by Furukawa and B a Linux Gateway running
2.4.25 with H323 conntrack support  from the lastest patch-o-matic and
iptables 1.2.9. On the Linux Gateway, eth0 is the valid IP interface and
eth1 is the invalid net.
  In this setup, there is just one NAT. I loaded the ip_conntrack_h323 and
ip_nat_h323 modules on B and used just one redirect and one snat line on
iptables:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 200.198.105.33
iptables -t nat -A PREROUTING -i eth0 -p tcp -m multiport --dports
1503,1720 -j DNAT  --to-destination 10.10.10.1

    With this setup everything works fine.... voice on both directions,
independent of who is calling.

 2) Now the second and (so far) problematic setup:

    A------------B====================C------------D
10.10.10.1       200.198.105.33           200.198.105.35        192.168.1.1


    Being A and D FXS voice gateways by Furukawa and B and C Linux Gateways.
    Again, on both boxes Im running Linux 2.4.25 with H323 conntrack support
from the latest path-o-matic and iptables 1.2.9
    This is the iptables setup:

    Host B:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 200.198.105.33
iptables -t nat -A PREROUTING -i eth0 -p tcp -m multiport --dports
1503,1720 -j DNAT  --to-destination 10.10.10.1

    Host C:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 200.198.105.35
iptables -t nat -A PREROUTING -i eth0 -p tcp -m multiport --dports
1503,1720 -j DNAT  --to-destination 192.168.1.1

    Now there are two Nats.. and if I dial from A to D, D can hear A but A
cant hear D, and vice-versa. Using tcpdump, I found out that after the
connection, A tries to send the UDP voice packets (port 16384,16385) to
192.168.1.1 (invalid IP from D) , and not to 200.198.105.35.... it took me
some time to find this
out, since before D ip was also 10.10.10.1, and then the voice packets from
A never even reached B :p
    Its seems that when A dials D and D answers, the H323 conntrack system
on C doesnt change some field on the apllication level of the protocol H323
protocol for D´s packets... so it in spite of the level 4 aspect of packet
is correctly SNATted by C, the level 7  aspect still carries the invalid IP
from D...
    I just couldnt fix this.
    Another odd thing... just for the sake of it, I tried to load the
RTSP_CONNTRACK module,
    modprobe ip_rtsp_conntrack ports=16384 (the RTSP port configured on the
Furukawa boxes).. then it simples worked.. voice on both sides.. but only
once... If I dial again, stops working. Not sure if this is related at all..
I suppose is just an odd coincidence.
    If you need any more info, just let me know... what really bothers me is
that everything is fine with just one nat...

                    Many thanks in advance, for any help


                                                        Marcelo



      reply	other threads:[~2004-03-15 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 18:26 A match similar to quota but for packets Damjan
2004-03-15 20:04 ` Frank Gruellich
2004-03-15 21:13   ` Marcelo Mercio Dandrea [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='028801c40ad2$55d15a90$010a0a0a@SHINOBU' \
    --to=marcdan@terra.com.br \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox