Forwarding traffic to smtp server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
	I have a question for you.  These are my current rules for sending
traffic on port 25 to my mail server.  I'm running kernel 2.4.

$IPTABLES -A FORWARD -i $EXTERNALIF -o $INTERNALIF -p tcp --dport 25 -m
state --state NEW,ESTABLISHED,RELATED -j ACCEPT

$IPTABLES -t nat -A PREROUTING -i $EXTERNALIF -p tcp --dport 25 -d
$MYADDR -j DNAT --to-destination 192.168.2.254:25

$IPTABLES -t nat -A POSTROUTING -o $EXTERNALIF -p tcp --dport 25 -d
192.168.2.254 -j SNAT --to-source 192.168.2.250

where $EXTERNAL is my external interface (eth0), $INTERNALIF is my
internal interface (eth1), and $MYADDR is my IP address: 12.42.147.158.


They seem to work other than my mail server views all packets as coming
from the firewall and not from external IP addresses.  Is there a way to
get the originating IP address to my mail server?

Thanks!

Travis Crook
Visions Beyond



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux