[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150627085007.GA4910@electric-eye.fr.zoreil.com>
Date: Sat, 27 Jun 2015 10:50:07 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Andy Lutomirski <luto@...capital.net>
Cc: Network Development <netdev@...r.kernel.org>
Subject: Re: Why can't we SNAT (or inverse DNAT) in PREROUTING?
Andy Lutomirski <luto@...capital.net> :
> On Fri, Jun 26, 2015 at 3:48 PM, Francois Romieu <romieu@...zoreil.com> wrote:
> > Andy Lutomirski <luto@...capital.net> :
[...]
> >> Shouldn't the order of operations be:
> >>
> >> 1. Check rp_filter.
> >> 2. Handle NAT.
> >> 3. Routing decision.
> >> ?
> >
> > The admittedly painful fwmark part would still be needed for pre-NAT
> > source address based policy routing (assuming SNAT loses valuable policy
> > information). Life would be easier for your current requirements but
> > some different policy requirements would be unable to avoid the
> > fwmark/mangle style stuff.
>
> What kind of policy routing would care about the pre-NAT source
> address? AIUI, the usual use of policy routing is to *route*, not to
> filter. But maybe I'm missing something.
?
The same could be said regarding your (post NAT) source address policy
routing requirement.
> > Btw, the suggested scheme implies that filtering between SNAT and DNAT
> > would be done before routing, thus without INPUT vs FORWARD tainting.
>
> What do you mean by "filtering between SNAT and DNAT"?
I had Jan Engelhardt's netfilter packet flow diagram in mind.
Replacing it with a 3 steps packet processing conceptual flow does not
seem trivial to me.
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists