From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Surda Subject: Re: REDIRECT changes DST address of the packet Date: Thu, 30 Jun 2005 12:11:24 +0200 Message-ID: <2005530121124577@mail.routehat.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: To: netfilter-devel@lists.netfilter.org In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org On Thu, 30 Jun 2005 10:08:55 +0200 (CEST) Krzysztof Oledzki wrote: >> If I lose original DST address, how can I persist >> that value in that packet. >Please use getsockopt() with SO_ORIGINAL_DST. Hehe you were faster than me :-). Nari, if you don't understand how to do this, check out the source of som= e transparent proxies (squid, p3scan) for examples (as Krzysztof said, grep= for SO_ORIGINAL_DST). I think it's straightforward, I even managed to reprodu= ce this in perl without using any C. >Best regards, > Krzysztof Ol=C4=99dzki Yours sincerely, Peter