From: Henrik Nordstrom Subject: Re: policy routing on locally generated packets [summary] Date: 27 Aug 2003 16:58:52 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <1061996331.3360.51.camel@henrik.marasystems.com> References: <1061995596.1247.28.camel@drs0.manchotnetworks.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Patrick McHardy , Patrick Schaaf , netfilter-devel Return-path: To: "lartc@manchotnetworks.net" In-Reply-To: <1061995596.1247.28.camel@drs0.manchotnetworks.net> Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org ons 2003-08-27 klockan 16.46 skrev lartc@manchotnetworks.net: > final conclusion: > to effectively obtain policy routing on locally generated packets, the > OUTPUT ROUTING process would need to be hooked into netfilter thereby > letting packets be marked. OUTPUT ROUTING would then use the mark to > find a routing table via a routing rule. But it is... The OUTPUT mangle chain is before routing. The exception is source address assignment on unbound sockets which is part of building the packet to send. The source IP address assignment is not really a routing decision but uses the same engine in the kernel. If you mangle OUTPUT packets in iptables then the packet will be rerouted if already routed. But the source IP address is already assigned and will not be automatically changed unless you instruct iptables to do so via NAT. Regards Henrik -- Henrik Nordstrom MARA Systems AB