Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Mike Wright <mike.wright@mailinator.com>
To: netfilter@vger.kernel.org
Subject: Re: why can't I DNAT SIP?
Date: Thu, 08 May 2008 17:31:29 -0700	[thread overview]
Message-ID: <48239B61.5060107@mailinator.com> (raw)
In-Reply-To: <fvtjuu$7i1$1@ger.gmane.org>

sean darcy wrote:
> On my outside box I trying to route sip ( port 5060 ) and iax ( 4659 ) 
> packets to an internal asterisk server. I use DNAT, which works fine for 
>  iax, but doesn't for SIP. I'm using identical DNAT statments.
> 
> The log shows the SIP packets coming in, but then going to the INPUT 
> chain. Nothing shows up on the FORWARD chain.
> 
> iptables -L -n -v -t nat
> Chain PREROUTING (policy ACCEPT 168K packets, 17M bytes)
>  pkts bytes target     prot opt in     out     source destination
>     0     0 DNAT       udp  --  external *       0.0.0.0/0 
> 0.0.0.0/0           udp dpt:4569 to:10.10.10.180:4569
>     0     0 DNAT       udp  --  external *       0.0.0.0/0 
> 0.0.0.0/0           udp dpts:10000:10100 to:10.10.10.180
>     0     0 DNAT       udp  --  external *       0.0.0.0/0 
> 0.0.0.0/0           udp dpt:5060 to:10.10.10.180:5060
> 
> Chain POSTROUTING (policy ACCEPT 3098 packets, 298K bytes)
>  pkts bytes target     prot opt in     out     source destination
>     0     0 LOG        udp  --  *      lan     0.0.0.0/0 
> 0.0.0.0/0           udp dpt:5060 LOG flags 0 level 4 prefix `SIP-POST: '
>     5   268 SNAT       all  --  *      external  0.0.0.0/0 
> 0.0.0.0/0           to:xxx.yyy.zzz.ooo
>

I've found it very helpful to look at the rules as output by the command
"iptables-save".  It's formatted nicely and in order of evaluation.  If
there are errors they are easier to spot (at least for me).

my 2p


      parent reply	other threads:[~2008-05-09  0:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08  1:10 why can't I DNAT SIP? sean darcy
2008-05-08 19:31 ` Grant Taylor
2008-05-08 22:24   ` sean darcy
2008-05-09  1:18     ` sean darcy
2008-05-09 14:15     ` Grant Taylor
2008-05-09 14:23       ` Patrick McHardy
2008-05-10  2:04         ` sean darcy
2008-05-10  8:43           ` Jan Engelhardt
2008-05-11 14:53             ` sean darcy
2008-05-11 14:58               ` Jan Engelhardt
2008-05-11 18:02                 ` sean darcy
2008-05-11 18:12                   ` Jan Engelhardt
2008-05-12 16:01           ` Patrick McHardy
2008-05-09  0:31 ` Mike Wright [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=48239B61.5060107@mailinator.com \
    --to=mike.wright@mailinator.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox