I’ve set up a new centos 7 virtual server with virtualmin gpl up over at digitalocean and transferred my existing sites to it.
I can’t receive mail though… running port checks, they say that port 25 and 465 are closed, despite me having them open in iptables (posted below)
24/tcp filtered priv-mail
25/tcp closed smtp
26/tcp filtered rsftp
464/tcp filtered kpasswd5
465/tcp closed smtps
466/tcp filtered digital-vrc
My intention was to have the others closed, and 25 and 465 open…
If I stop iptables, the ports listed above all go to ‘closed’.
Where am I going wrong here (or… where did the tutorial I was using have me go wrong?)
My current iptables (the last two lines are for custom ssh and virtualmin ports)
[root@jessica ~]# iptables -S
-P INPUT DROP
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
-A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 465 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 110 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 995 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 143 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 993 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 703 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 13730 -j ACCEPT