iptables does not allow when adding

Support for security such as Firewalls and securing linux
rude2012
Posts: 7
Joined: 2014/10/06 20:17:10

iptables does not allow when adding

Postby rude2012 » 2015/11/20 18:13:37

Re: iptables imap
Postby rude2012 » 2015/11/20 18:06:04

ok, i have an update. looks like imap is in dovecot but the iptables is not letting me in. i added to the table as show below, but when i still cannot telnet into the imap. if i turn off iptables, i can telnet into using the imap port with no problem. what am i missing here. i have issued services iptables save and restarted services. still only can hit the imap if iptables is stopped. any help is appreciated.

--rudy

here is my ip tables: i can connect using ports 22, 25 110, 587. none of the other reports respond. do not know what i am missing, please help.
cat iptables

# Generated by iptables-save v1.3.5 on Fri Nov 20 11:13:53 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5055:15694472]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 993 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 995 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Fri Nov 20 11:13:53 2015
[root@mail2 sysconfig]#
rude2012

Posts: 4
Joined: 2014/10/06 20:17:10

aks
Posts: 2498
Joined: 2014/09/20 11:22:14

Re: iptables does not allow when adding

Postby aks » 2015/11/20 19:46:46

You do know that IMAP default port is is 220 (in version 3). IMAPS - i.e.: over TLS is 993. Given you're connecting to POP3 (plain) at 110, I guess you're trying to connect to IMAP not IMAPS

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: iptables does not allow when adding

Postby gerald_clark » 2015/11/20 20:49:08

Don't double post. It wastes support effort.
https://www.centos.org/forums/viewtopic ... 8617e6f966