From: "Lloyd Standish" <lloyd@crnatural.net>
To: Andrew Beverley <andy@andybev.com>
Cc: netfilter@vger.kernel.org
Subject: Re: problem with multi-level SNAT? (multiple uplinks/providers)
Date: Mon, 02 Jan 2012 13:01:45 -0600 [thread overview]
Message-ID: <op.v7g0g7k4x1lyi3@debiandesk2.net> (raw)
In-Reply-To: <1325528733.2270.32.camel@andybev-desktop>
On Mon, 02 Jan 2012 12:25:33 -0600, Andrew Beverley <andy@andybev.com> wrote:
>> As a related aside, I'd appreciate comments on whether or not the "-p
>> tcp" in the following example rule is advisable (I omitted "-p tcp"
>> from my SNAT rules.): iptables -t nat -A POSTROUTING -p tcp -o eth0 -j
>> SNAT --to-source 194.236.50.155
> Well, I never put a -p tcp in SNAT for any of my configurations. I'm not
> sure why you would want to limit SNAT to just TCP?
Thanks for the comment. I asked because I have seen "-p tcp" in other people's load-balancing scripts, and I couldn't understand why they were limiting to tcp. I thought there must be something here I'm missing. (Maybe they used it in order to be able to specify a port range for the SNAT).
I think that since SNAT applies to entire connections, other protocols will be SNATted with '-p tcp' if they are RELATED to an initial (NEW) tcp packet. Maybe that is why the 'p tcp' specifier appears not to give trouble.
Anyway, I'm glad my logic is the same as yours. I'll leave '-p tcp' out of my SNAT rules. I want all traffic balanced over my interfaces - except of course packets that match certain policy routing rules.
(By the way, my new load-balancing router is working great, and my ISP and I are very relieved, after weeks of mysteriously-broken connections and disgruntled users.)
--
Lloyd
prev parent reply other threads:[~2012-01-02 19:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-01 17:12 problem with multi-level SNAT? (multiple uplinks/providers) Lloyd Standish
2012-01-02 18:25 ` Andrew Beverley
2012-01-02 19:01 ` Lloyd Standish [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=op.v7g0g7k4x1lyi3@debiandesk2.net \
--to=lloyd@crnatural.net \
--cc=andy@andybev.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