Results 1 to 1 of 1
Any help here would be greatly appreciated. Problem: I have a linux (RHEL4) FW using IPTABLES I am forwarding packets from external interface to internal Exchange Server Exchange server sees ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-03-2008 #1
- Join Date
- Mar 2008
IPTABLES FW Forward to Exchange Svr
I have a linux (RHEL4) FW using IPTABLES
I am forwarding packets from external interface to internal Exchange Server
Exchange server sees all mail as coming from FW box (192.168.192.1)
From mail header:
Received: from pccarlos.lan (192.168.192.1)
So, I cannot do reverse lookups, and worse (imagine that) spam filters are not working correctly.
I need to forward these packets without altering the IP
Other than the Exchange server seeing all mail as coming from the FW the below code is working.
Any help much appreciated.
$SMTP is eth1:16 (EXTERNAL IP)
$INTERNALIF is eth0 (INTERNAL IP)
192.168.192.1 is just IP address of eth0 (same as $INTERNALIF)
$IPTABLES -A FORWARD -i $SMTP -p tcp -m state --state NEW -d 192.168.193.7 -j ACCEPT
$IPTABLES -A FORWARD -i $SMTP -o $INTERNALIF -d 192.168.193.7 -p tcp -j ACCEPT
$IPTABLES -A FORWARD -i $INTERNALIF -o $SMTP -d 0.0.0.0/0.0.0.0 -s 192.168.193.7 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -d $SMTP -p tcp -j DNAT --to 192.168.193.7
$IPTABLES -A POSTROUTING -t nat -d 192.168.193.7 -j SNAT --to 192.168.192.1