Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: msn and yahoo messenger voice chat
Date: Tue, 12 Apr 2005 08:39:40 -0400	[thread overview]
Message-ID: <20050412123940.GA26073@bender.817west.com> (raw)
In-Reply-To: <1113309566.425bc17e6a46f@webmail.yanbulink.net>

On Tue, Apr 12, 2005 at 03:39:26PM +0300, Wennie V. Lagmay wrote:
> 
> Thank you Jason, I just want to confirm is it to be writen
> 
> like this alone:
> iptables -t nat -A POSTROUTING -s 192.169.10.0/24  -j SAME --to
> xxx.xxx.85.113-xxx.xxx.85.115

yes--SAME can completely replace your SNAT rule, if you so desire.

> or the original SNAT plus SAME like this :
> IPTABLES -A POSTROUTING -s 192.169.10.0/255.255.255.0 -j SNAT --to-source
> xxx.xxx.85.113-xxx.xxx.85.115

that rule isn't completely correct, as it has no "-t nat" in it.

> iptables -t nat -A POSTROUTING -s 192.169.10.0/24  -j SAME --to
> xxx.xxx.85.113-xxx.xxx.85.115

if you're asking if you should have a SNAT rule followed by a SAME rule
that are identical except for the target, then no--the SAME rule will
never be matched in that scenario.

if you want to combine SAME and SNAT--put the SAME rule first and have
it match only on the specific ports used by the application in question
that cannot handle src IP changes; and the SNAT rule second to catch the
rest of the general traffic.

HTH...

-j

--
"Chris: Where do you think you go when you die?
 Southern boy: I learned from church that if you're good you go to
 heaven but if you're bad, you go to a place where the dead believe
 they're still living and they pray for death but death won't come.
 Chris: UPN?"
        --Family Guy


       reply	other threads:[~2005-04-12 12:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1113309566.425bc17e6a46f@webmail.yanbulink.net>
2005-04-12 12:39 ` Jason Opperisano [this message]
2005-04-12 14:55   ` msn and yahoo messenger voice chat Wennie V. Lagmay
2005-04-12 17:03     ` Jason Opperisano
2005-04-13  5:13       ` Wennie V. Lagmay
2005-04-14  5:11     ` Wennie V. Lagmay
2005-04-14 12:05       ` Jason Opperisano
2005-04-12 14:27 Daniel Lopes
  -- strict thread matches above, loose matches on Subject: below --
2005-04-09  6:30 Wennie V. Lagmay
2005-04-11 22:19 ` Jason Opperisano
2005-04-12 12:27   ` Wennie V. Lagmay

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=20050412123940.GA26073@bender.817west.com \
    --to=opie@817west.com \
    --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