Re: IPTABLES + OUTPUT + SNAT

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

 



On Thu, January 5, 2006 13:07, Rubén Navarro Huedo wrote:
...
> We need to do this:
> Our server has 2 ip's. One is used only for SMTP outgoing and the
> other for all the rest.
> All is running fine except that our smtp outgoing IP has problems
> conecting ONLY to one smtp server.

Could it be that it's an smtp problem (eg PIX fsck-up) ?

> What we want to do is: all from our server to that smtp server change
> the source IP and use the other one that we have in our server.
> Do i explain ok? My english is not very good :(
> We are trying this with this:
>
> iptables -t nat -A OUTPUT -p tcp -j SNAT -d ip_wanadoo --to
> nuestra_otra_ip
>
> But:
> iptables: Invalid argument
>
> We are using OUTPUT becouse we think that it is the correct.
>
> Can this be done? What are we doing badly?

man iptables :
"SNAT
This target is only valid in the nat table, in the POSTROUTING chain."

iptables -t nat -A POSTROUTING -j SNAT -d ip_wanadoo \
  -p tcp --dport 25 --to nuestra_otra_ip


Gr,
Rob





[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux