Source NAT

Stéphane BENOLIEL sbenoliel at aacom.fr
Wed Aug 31 13:31:22 CEST 2005


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



More information about the netfilter mailing list