NetFilter
[Top] [All Lists]

Re: iptables NAT routing issues

To: netfilter@lists.netfilter.org
Subject: Re: iptables NAT routing issues
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
Date: Wed, 09 May 2007 01:03:54 +0200
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
In-reply-to: <4640FDA9.5000706@bserved.nl>
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
Organization: Plouf !
References: <4640E893.1010206@bserved.nl> <Pine.LNX.4.61.0705090024450.2342@yvahk01.tjqt.qr> <4640FAD0.9050301@plouf.fr.eu.org> <Pine.LNX.4.61.0705090036060.2342@yvahk01.tjqt.qr> <4640FDA9.5000706@bserved.nl>
Sender: netfilter-bounces@lists.netfilter.org
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
Bas Verhoeven a écrit :

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.

The webserver has its own gateway, and that's not the outer box.

Don't look further. Here is why it does not work.

Is there really no solution for this?

Use the outer box as a gateway, if it is in the same network. You do not have to use it as the default gateway for all traffic but at least for the HTTP return traffic. This could be done with iptables and advanced routing on the web server, for instance using the source port 80 to MARK packets or using CONNMARK/connmark.

You could try to use the NOTRACK target on the web server in order to prevent the incoming SYN packets from creating a new connection, so the replies could be SNATed. But I would not bet a euro-cent on such a dirty method. If someone asks who suggested it, don't say it's me. ;-)


<Prev in Thread] Current Thread [Next in Thread>