I want to test port forwarding and therefore I've added to a computer with two NICs this configuration:
# Port forwarding smtp
iptables -t nat -A PREROUTING -p TCP -d MYLOCALIP --dport 25 -j DNAT --to SMTPIP:25
iptables -t nat -A PREROUTING -p UDP -d MYLOCALIP --dport 25 -j DNAT --to SMTPIP:25
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
eth0 has a public ip and the gateway to get to internet
eth1 has LAN ip
I've tried a windows xp outlook client setting its smtp to this MYLOCALIP but it won't work.
What am I doing wrong?
If it can be of any help my ISP requires username and password and this has been configured correctly on outlook.