Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Paul Evans <paul@mxtelecom.com>
To: netfilter@vger.kernel.org
Subject: Re: -j ROUTE and conntrack
Date: Wed, 29 Oct 2008 18:03:20 +0000	[thread overview]
Message-ID: <20081029180320.16e92db5@nacelle.mxtelecom.com> (raw)
In-Reply-To: <20081029154650.004cc3b5@nacelle.mxtelecom.com>

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

On Wed, 29 Oct 2008 15:46:50 +0000
Paul Evans <paul@mxtelecom.com> wrote:

> I'm using the "-j ROUTE" target to force a routing decision for this,
> but it seems to have the side effect of breaking conntrack. Without -j
> ROUTE, the outbound connection appears in the conntrack table, so that
> when incoming replies arrive, they pass an ESTABLISHED test, and are
> let in. If it needs to -j ROUTE on the way out, then when the reply
> comes back, no conntrack entry means it fails ESTABLISHED and gets
> dropped. It seems that "-j ROUTE --continue" doesn't help either, it
> still goes missing.

Actually, this seems to be my mistake. There's an unfortunate
side-effect of giving ROUTE the --continue option when called from
PREROUTING. The packet exits the PREROUTING chain already with a
routing decision made in it before it hits the kernel's routing core
which seems to confuse it. It then drops the packet and the
conntrack information associated.

I've moved the ROUTE calls into POSTROUTING and now it seems to work
fine - it routes correctly, it remains in conntrack so the reply passes
the ESTABLISHED test.

-- 
Paul Evans <paul@mxtelecom.com>
Tel: +44 (0) 845 666 7778
Fax: +44 (0) 870 163 4694
http://www.mxtelecom.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2008-10-29 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 15:46 -j ROUTE and conntrack Paul Evans
2008-10-29 18:03 ` Paul Evans [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=20081029180320.16e92db5@nacelle.mxtelecom.com \
    --to=paul@mxtelecom.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