(E-Mail Removed) writes:
>I want to open the port no 110 i.e. POP3 port so that I can download my
>mails from outside.
It depends on what interface your machine is using to talk to the outside
world (eg, ethernet or a ppp interface). It would be helpful if you could
explain how your network is set up - and also to be a little less ambiguous
about what you want to do. I will assume you mean you want to retrieve mail
from your own box, from an external network.
In my case, my net connection is via an ethernet card, so my iptables rules
look something like this (mostly ripped from the Netfilter HOWTO):
iptables -N block # Create a new chain
iptables -A INPUT -j block # Apply block chain to INPUT packets
iptables -A FORWARD -j block # Apply block chain to FORWARD packets
# Next line allows replies to connections originating from inside
iptables -A block -m state --state RELATED,ESTABLISHED -j ACCEPT
# Allow new connections on all interfaces accept our external ethernet
iptables -A block -m state --state NEW -i ! eth0 -j ACCEPT
# Allow ssh from anywhere
iptables -A block -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A block -j DROP # Drop everything else
In your case, you'd need to add this line for POP:
iptables -A block -p tcp -m tcp --dport 110 -j ACCEPT
Paul.
--
Paul Dwerryhouse | PGP Key ID:
(not in) Melbourne, Australia | 0x6B91B584