eslatino writes:

Whwn I stopped iptables I could connect with telnet via port 110. Now the problem is to add the apropiate pop3 rule Any idea?

Thnks


Hi,


if you're doing port forwarding with SourceNAT and Destination NAT you should put something like this in your FW rules (iptables ONLY)

$IPTABLES -t nat -A PREROUTING -d <YOUR PUB IP ADDRESS> -p tcp --dport 110 -j DNAT --to <YOUR PRIVATE IP ADDRESS>
$IPTABLES -t nat -A POSTROUTING -s <YOUR PRIVATE IP ADDRESS> -o eth0 -j SNAT --to <YOUR PUB IP ADDRESS>
$IPTABLES -A FORWARD -p tcp -i eth0 -o eth1 -d <YOUR PRIVATE IP ADDRESS> --dport 110 -j ACCEPT


This assumes that your default rules are BLOCK ALL

If you just want to let traffic in
$IPTABLES -A INPUT -i eth0 -p tcp -d <YOUR PUBLIC IP> --dport 110 -j ACCEPT


Also dont forget the OUTPUT rules. You must allow STABLISHED and RELATED connections pass to your clients.

Also, you can read the man iptables man pages.

Best luck
srosa




Reply via email to