Linux: Iptables # 14 How to allow POP3 server/protocol request
Local e-mail clients use the Post Office Protocol version 3 (POP3) to retrieve e-mail from a remote server over a TCP/IP connection.
POP3 allows to retrieve mail. It uses the TCP port 110. Following two iptable rules allows incoming POP3 request on port 110 for server IP address 202.54.1.20 (open port 110):
You need to add following rule set to your iptables shell script:
iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 202.54.1.20 --dport 110 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 110 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
In order to block port 110 simply use target REJECT instead of ACCEPT in above rules i.e.:
iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 202.54.1.20 --dport 110 -m state --state NEW,ESTABLISHED -j REJECT
iptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 110 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j REJECT
You may also be interested in other helpful articles:
- Linux Iptables allow or open IMAP server port
- Linux Iptables allow or block ICMP ping request
- Linux Iptables allow WEBCACHING incoming client request
- Linux Iptables allow LDAPS server incoming client request
- Linux Iptables allow LDAP server incoming client request
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


after runing this “iptables -A INPUT -p tcp -s 0/0 –sport 1024:65535 -d 202.54.1.20 –dport 110 -m state –state NEW,ESTABLISHED -j ACCEPT” It says Device or resource busy. Hint: insmod error can be caused byincorrect module parameters, including invalid IO or IRQ parameters.
what should i do??
-Following two iptable rules allows incoming POP3 request on port 25
+Following two iptable rules allows incoming POP3 request on port 110
Ash,
Thanks for heads up.