[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Policy routing on local packets

Gerardo Castillo Alvarado a écrit :
Andreas Onderka escribió:

iptables -t nat -A POSTROUTING -p tcp -o <extIF> --sport 25 -j SNAT
--to-source <IP2>

Don't forget that the SNAT target is for static ip.

Otherwise, you should use MASQUERADE if you are on a dynamic IP address.

Irrelevant. MASQUERADE does not allow to specifiy the new source address. It just uses the default interface address. In other words, it would do nothing.

Reply to: