From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bas Verhoeven Subject: Re: iptables NAT routing issues Date: Wed, 09 May 2007 00:46:01 +0200 Message-ID: <4640FDA9.5000706@bserved.nl> References: <4640E893.1010206@bserved.nl> <4640FAD0.9050301@plouf.fr.eu.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-bounces@lists.netfilter.org Errors-To: netfilter-bounces@lists.netfilter.org Content-Type: text/plain; charset="us-ascii"; format="flowed" To: netfilter@lists.netfilter.org Jan Engelhardt wrote: > >> Assuming that the outbound server is the default gateway for the web server and >> receives the return traffic, of course. >> > > You'd be kinda screwed if that was not the case. Because the 'nat' table > is only consulted for NEW connections afaics, the reply packets do _not_ > get SNATed, since the _first_ packet was the TCP SYN, which makes the > connection ESTABLISHED when input processing is done. > > The webserver has its own gateway, and that's not the outer box. You seem to be describing the exact problem i'm seeing in tcpdump; new connections get snat'ed, 'forwarded' connections do not. Is there really no solution for this? Bas