Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "news.gmane.org" <seandarcy2@gmail.com>
To: netfilter@vger.kernel.org
Subject: DNAT to a specific interface?
Date: Mon, 10 Nov 2008 13:34:46 -0500	[thread overview]
Message-ID: <gf9us7$pub$1@ger.gmane.org> (raw)

I have a multihomed server. eth0 for internal NAT, eth1 for default 
internet, and eth3 for VOIP.

VOIP comes into the server with dport set to 19999. What I'd like to do 
is have all those VOIP packets set to a real VOIP port ( which I think I 
can figure out ) and go out eth3. I can't set up a static route going 
out eth3 since the SIP proxies are dynamic, so they don't have a fixed 
ip address.

So:

iptables -t nat -A POSTROUTING -i eth0 -p udp --dport 19999 -j DNAT --to 
:5469
iptables -t nat -A PREROUTING  -i eth3 -p udp --dport 5469  -j DNAT --to 
:19999

would change the port, but how can I tell it to use interface eth3?

sean


             reply	other threads:[~2008-11-10 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 18:34 news.gmane.org [this message]
2008-11-10 21:38 ` DNAT to a specific interface? Grant Taylor

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='gf9us7$pub$1@ger.gmane.org' \
    --to=seandarcy2@gmail.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