Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Stéphane BENOLIEL" <sbenoliel@aacom.fr>
To: netfilter@lists.netfilter.org
Subject: Re: Source NAT
Date: Wed, 31 Aug 2005 13:33:59 +0200	[thread overview]
Message-ID: <431595A7.5050608@aacom.fr> (raw)
In-Reply-To: <4315950A.4000300@aacom.fr>

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Stéphane BENOLIEL wrote:

> 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
>

sorry.... mistmach...... the good solution is :

iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT  --to-destination10.1.1.1

>> Can anyone give me any advice on completing that?
>>
>> Regards,
>>
>>
>>
>>
>>  
>>
>


  reply	other threads:[~2005-08-31 11:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-31 11:18 Source NAT Jimmy
2005-08-31 11:31 ` Stéphane BENOLIEL
2005-08-31 11:33   ` Stéphane BENOLIEL [this message]
2005-08-31 11:37 ` /dev/rob0
2005-09-03 19:28   ` ISC Jorge Ceron Galvan
2005-09-03 20:29     ` /dev/rob0
  -- strict thread matches above, loose matches on Subject: below --
2004-07-06 18:49 Michael Forrest

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=431595A7.5050608@aacom.fr \
    --to=sbenoliel@aacom.fr \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox