Brandon a écrit :
>
> Again, sorry for the lack of detail, as my iptables experience is very
> limited. [...]
This does not matter. What matters it that you did not answer my
questions. Maybe I was not clear enough, so I'll rephrase.
What is the problem ? In other words, what is the result that you
observe instead of what you expected ?
You need to tell more about your network setup : where is the mail
server, where is the Barracuda, where are the clients, where are the
routers/firewalls/gateways ?
On which host is the iptables rule ? On the mail server (xxx.184.64.3)
itself or on another box acting as a router/gateway/firewall/whatever ?
What are the interfaces and routes on this box and on the Barracuda ?
What is xxx.xxx.66.0/24 ?
You said that SMTP traffic from anything but the Barracuda
(xxx.184.65.15) should be redirected, but xxx.xxx.66.0/24 does not look
like "anything but the Barracuda".
Assuming that the rule is on the mail server, what about theses rules :
iptables -t nat -A PREROUTING -i eth0 -s ! xx.xx.65.15 -d xx.xx.64.3 \
-p tcp --dport 25 -j DNAT --to-destination xx.xx.65.15
iptables -t nat -A POSTROUTING -o eth0 -s ! xx.xx.64.3 -d xx.xx.65.15 \
-p tcp --dport 25 -j SNAT --to-source xx.xx.64.3
(I slightly modified the DNAT rule and added the SNAT rule)
Be aware that if this solves the problem it does not mean that it is an
adequate solution. The SNAT rule hides the real source address from the
Barracuda, and this may be a problem.
|