port 25 & 110 forward

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

 



I’m trying to forward smtp and pop3 from my router to my mail server at 10.13.110.1.  I’ve tried both of the following iptables commands, neither has worked.

 

$IPTABLES -t nat -A PREROUTING -i eth1 -p tcp --dport 25 -j DNAT --to 10.13.110.1

$IPTABLES -t nat -A PREROUTING -i eth1 -p tcp --dport 110 -j DNAT --to 10.13.110.1

$IPTABLES -A FORWARD -p tcp -d 10.13.110.1 --dport 25 -j ACCEPT

$IPTABLES -A FORWARD -p tcp -d 10.13.110.1 --dport 110 -j ACCEPT

 

 

$IPTABLES -t nat -A PREROUTING -d <public_ip> -p tcp --dport 25 -j DNAT --to 10.13.110.1:25

$IPTABLES -A FORWARD -p tcp --dport 25 -j ACCEPT

$IPTABLES -t nat -A PREROUTING -d <public_ip> -p tcp --dport 110 -j DNAT --to 10.13.110.1:110

$IPTABLES -A FORWARD -p tcp --dport 110 -j ACCEPT

 

The later works great for ftp and http forwards.  Why won’t it work for 25 and 110?

 

eth0= 10.13.110.1

eth2= <public_ip>

 

Matt Brei

 


[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