forwarding port 25 to internal SMTP server
Rimantas Mocevicius
rmocius@auste.elnet.lt
Fri, 7 Dec 2001 12:32:53 -0000
Hi foks,
I have a FW with running iptables and I'd like to make forward for port 25
from external IP to internal IP .
I tried to use these commands:
iptables -A INPUT -i $EXTERNAL_INTERFACE -p tcp --dport 25 --destination
10.105.105.21 -j ACCEPT or
iptables -t nat -A PREROUTING -d $EXTERNALIP -p tcp --dport 25 -j DNAT --to
10.105.105.21 or
iptables -t nat -A PREROUTING -i $EXTERNAL_INTERFACE -p TCP --dport 25 -j DNAT
--to 10.105.105.21:25
but I cannot connect with command telnet externalip:25 to email server.
For my web server it's working fine with:
iptables -t nat -A PREROUTING -i $EXTERNAL_INTERFACE -p tcp -d $EXTERNALIP
--dport 80 -j DNAT --to-destination 10.105.105.198:80
Can you help me, please?
Thanks in advance
Rimas