From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?St=E9phane_BENOLIEL?= Subject: Re: Source NAT Date: Wed, 31 Aug 2005 13:31:22 +0200 Message-ID: <4315950A.4000300@aacom.fr> References: <58867.212.100.225.55.1125487119.squirrel@webmail.*> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050606070303060004040808" Return-path: In-Reply-To: <58867.212.100.225.55.1125487119.squirrel@webmail.*> 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 To: Jimmy Cc: netfilter@lists.netfilter.org This is a multi-part message in MIME format. --------------050606070303060004040808 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Jimmy wrote: >Hello, > >I currently have a situation that I am hoping iptables can resolve. The >issue is that I need to NAT the source address based on the destination >address. Is that possible with IPTables ? > >For example > >if dst = 1.1.1.1 src = 10.1.1.1 >if dst = 1.1.2.1 src = 10.1.1.2 > > You can use DNAT for exemple: iptables -t nat -A PREROUTING -s 1.1.1.1 -j DNAT --to-destination10.1.1.1 >Can anyone give me any advice on completing that? > >Regards, > > > > > > --------------050606070303060004040808--