port 25 forwarding iptables FC4, can't get it to pass traffic
Hi All,
I am trying to to set up port forwarding using iptables to forward all port 25 traffic from my mail server to a spam appliance. The trick is that I want to direct all but traffic from one IP address over to the appliance. here is the rule I am trying to use... iptables -t nat -A PREROUTING -i eth0 -p tcp -s !10.x.x.x --dport 25 -j DNAT --to-destination 10.x.x.15:25 Any ideas what I am doing wrong? Cheers |
That rule looks fine to me. What happens when you try to use it?
|
hey just do this on the mailserver and it should work
route add default gw <IP Address of eth0> |
thanks for the responses. When I try to use the rule I can't send through the mailserver and traffic does not get redirected. Adding the route command as suggested above did not do the trick either.
|
Does that rule show up when you do iptables -t nat -L
Do you have rules in the FORWARD chain to allow the packets to be forwarded. Is ip_forwarding turned on in the kernel? You might also want to have ethereal or tcpdump running on the internal interface and see if you can observe the outgoing forwarded packets. |
All times are GMT -5. The time now is 06:33 PM. |