sorry, that should be:
iptables -t nat -A PREROUTING -p tcp --dport 25 -i eth1 -j DNAT --to x.x.x.x
itpables -A FORWARD -p tcp --dport 25 -d x.x.x.x -j ACCEPT
(it's been a while since I had to write these out)
you may also need to add:
iptables -t nat -A POSTROUTING -p tcp --dport 25 -s x.x.x.x -j SNAT --to y.y.y.y
(replace y.y.y.y with eth1 IP address)
Main Topics
Browse All Topics





by: gb-sdcPosted on 2007-08-02 at 12:02:44ID: 19619864
iptables -A PREROUTING -p tcp --dport 25 -i eth1 -j DNAT --to x.x.x.x
itpables -A FORWARD -p tcp --dport 25 -d x.x.x.x -j ACCEPT
Replace x.x.x.x with target IP address. This assumes that you do not need to pretend that the traffic originates from the machine running the iptables rules.