All of lore.kernel.org
 help / color / mirror / Atom feed
From: "\"Яцко Эллад Геннадьевич (ngs)\"" <eyatsko@ngs.ru>
To: netfilter@vger.kernel.org
Subject: How to make bi-directional NAT'ting?
Date: Tue, 23 Aug 2011 12:26:15 +0400	[thread overview]
Message-ID: <4E536427.2040503@ngs.ru> (raw)

Hello!

I have some specific problem with Cisco CP7961G IP phone.
It sends packets to external Softswitch using one UDP port
which differs from 5060 (voipControlPort in its .XML), but
it waits answers on 5060!
And I can't do anything with it! I have tried Firmware from
8.0.x up to 8.5.x - all the same!

One thing I think is make corresponding translation on IPTables.
SNAT in direct path (from 79161 to Softswitch) and DNAT
in backward direction (from outside Softswitch to 7961).

BUT IT DOESN'T WORK! :-)

$IPTABLES -t nat -A PREROUTING          -p udp -s 80.251.x.x 
                         -d 80.251.y.y --dport 5060 -j DNAT 
--to-destination 172.16.128.200:5060
$IPTABLES -t nat -A POSTROUTING -o eth0 -p udp -s 172.16.128.0/24 
--sport 1024:65535 -d 80.251.x.x --dport 5060 -j SNAT --to-source      
80.251.y.y:5060

What do I do wrong?

Kind regards,
Ellad Yatsko

             reply	other threads:[~2011-08-23  8:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23  8:26 "Яцко Эллад Геннадьевич (ngs)" [this message]
2011-08-23 10:50 ` How to make bi-directional NAT'ting? Tyler J. Wagner
     [not found]   ` <4E538A10.3030508@runoguy.ru>
2011-08-23 11:35     ` Tyler J. Wagner
2011-08-24  7:35       ` Re: Jan Engelhardt
2011-08-24  8:19         ` Re: Tyler J. Wagner

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=4E536427.2040503@ngs.ru \
    --to=eyatsko@ngs.ru \
    --cc=netfilter@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.