Results 1 to 4 of 4
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-18-2005 #1Just Joined!
- Join Date
- Mar 2005
- Posts
- 4
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.
Thanks
- 03-19-2005 #2Linux User
- Join Date
- Feb 2005
- Posts
- 290
First, do postrouting for your email server (i suppose your email server is configured to use the firewall as gateway):
Code:iptables -t nat -A POSTROUTING -s $EmailIP -o eth0 -j MASQUERADE #enable port forwarding echo "1" > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -t nat -p tcp -d $FireWallIP --dport 25 -j DNAT --to $EmailIP:25
- 03-19-2005 #3Just Joined!
- Join Date
- Mar 2005
- Posts
- 4
I'm not sure if the email server uses the firewall as a gateway. The firewall is used as a gateway to my LAN but the mail server is connected to the same hub that the firewall is and that our T1 line comes in on.
- 03-20-2005 #4What does the command route tell ?
Originally Posted by bsherwood I\'m so tired .....
#200472


Reply With Quote
