From: Antony Stone Subject: Re: Destination NAT Onto the Same Network Problem Date: Wed, 10 Jul 2002 16:46:17 +0100 Sender: netfilter-admin@lists.samba.org Message-ID: <200207101546.g6AFkP813015@vulcan.rissington.net> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Errors-To: netfilter-admin@lists.samba.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: netfilter@lists.samba.org On Wednesday 10 July 2002 4:10 pm, Joe Patterson wrote: > > > wrote: > > Oh. I knew you couldn't use -o in PREROUTING, because the routing > > hasn't been done yet, but I would have thought that POSTROUTING would > > remember where the packet came in from ? > > Yeah, that's always bothered me too. I'm sure there's a good reason, but > it doesn't make sense to me. > > The way around it, of course, is to set a mark in mangle/PREROUTING on > the -i interface, then check the mark in nat/POSTROUTING. Alternatively, > you can of course use -s $INTERNAL_NET Using -s is easy enough for the internal network, but a bit bothersome for the external network (!), so I like the suggestion for marking packets in the mangle table and then checking the mark later on.... Antony.