Iptables, email forwarding
I have a redhat 7.2 firewall with a redhat 8.0 pop3 email server and they are not on a local network together.
I recently reset the Iptables rules on the firewalll(big mistake) and now email is no longer being sent to the mail server. So by my master reasoning I'm guessing there was a rule forwarding email that is now lost.
A couple of things I have tried that have not worked(though its possible I'm doing something wrong)
1. iptables -t nat -A PREROUTING -t nat -p tcp $FireWallIP --dport 25 -j DNAT -to $EmailIP:25
2. iptables -t nat -A PREROUTING -d $FireWallIP -p tcp --dport 25 -j DNAT --to-destination $EmailIP:25(also tried $EmailIP)
3. iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 25 -j DNAT --to $EmailIP:25(als tried $EmailIP)
The fireWall does have 2 ipaddresses,(external, internal) while the Mail server only has an external one. I've only tried using the firewall's external ip address. I did try the internal once, but it cut off internet for everybody on the network(the firewall also acts as the default gateway for our windows machines) Any help appreciated.