From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Richard Pickett" Subject: RE: Forward specific port to another ip Date: Tue, 27 Dec 2005 13:11:12 -0600 Message-ID: <005101c60b19$4f252480$1101a8c0@quebec> References: 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" To: 'netfilter' Here's something to keep in mind on NAT, it only works if the NAT box is in-between both systems or you can double-NAT. Take this example: NAT BOX | ----------------- | | SYS A SYS B A connects to NAT A's connection looks like this: From: A:Portx To: NAT:Porty NAT NATs the packet to send it to B, the packet now looks like this: From: A:Portx To: B:Porty When B replies to the connection his packet looks like this: From: B:Porty To: A:Portx When this packet arrives at SYS A it doesn't recognize the connection, it's expecting all return packets to look like this: From: NAT:Porty To: A:Portx To make it work you have to double-NAT the packets. You have to NAT the PREROUTING to change the "TO", and the POSTROUTING to change the "FROM".