Image

Imagejgrafton wrote in Imagelinux

iptables question...

I'm trying to get all outgoing smtp traffic to go out over a specific ip address. (This linux box has multiple ip addresses bound to it.) As far as I can tell, there's no way to specify that in postfix, so I was contemplating using iptables.

I tried this, but it didn't work: (assume 123.45.68.90 is a valid ip address)

# iptables -t nat -I OUTPUT -p tcp -m tcp --dport 25 -j SNAT --to-source 123.45.68.90
iptables: Target problem

What's wrong? Thanks.