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