Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Lloyd Standish" <lloyd@crnatural.net>
To: Ed W <lists@wildgooses.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Routing for multiple uplinks/providers
Date: Mon, 02 Jan 2012 10:09:59 -0600	[thread overview]
Message-ID: <op.v7gsixgyx1lyi3@debiandesk2.net> (raw)
In-Reply-To: <4F01A679.8090103@wildgooses.com>

On Mon, 02 Jan 2012 06:43:37 -0600, Ed W <lists@wildgooses.com> wrote:

> I believe also routes are cached per IP, so I guess it might accidentally persist beyond even individual streams (assuming to/from same IPs)

Thanks, I didn't think of that.  If no policy routing rules are matched, the cached route should be used.  Of course, this doesn't explain why connections were dropped when the outgoing interface had a non-routable (LAN) IP number, but were never dropped from the one interface that has a public IP.

I'm hoping someone will comment on the use of "-p tcp" in the SNAT invocation:

(example rule)
iptables -t nat -A POSTROUTING -p tcp -o eth0 -j SNAT --to-source 194.236.50.155

I have always seen this rule with "-p tcp", and yet I think it is best to mark ALL my outgoing connections, in case the one interface associated with the default route happens to be down.  For example, DNS queries are usually UDP, I believe.

-- 
Lloyd Standish

      reply	other threads:[~2012-01-02 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 17:21 Routing for multiple uplinks/providers Lloyd Standish
2012-01-01 16:30 ` Lloyd Standish
2012-01-02 12:43   ` Ed W
2012-01-02 16:09     ` 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.v7gsixgyx1lyi3@debiandesk2.net \
    --to=lloyd@crnatural.net \
    --cc=lists@wildgooses.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