networkuser
Goto Top

Plesk Firewall (IPTables) IMAP sperren ohne Funktion

Hallo,
ich wende mich (leider) mit einem weiteren Problem an euch. Folgende Eckdaten zum Server: Ubuntu+Plesk12.
Ich nutze die Pleskoberfläche zur Konfiguration der Firewall.
Da ich IMAP über Port 143 nach aussen nicht anbieten möchte (Nur IMAPS über Port 993), habe ich eine neue Regel erstellt und hinzugefügt.
Diese ist wie folgt konfiguriert: "Eingehend von alle auf Port 143/tcp verweigern"
Jedoch sind weiterhin Verbindungen auf Port 143 möglich. (Getestet mittels telnet)

Erst dann, wenn ich die Regel "IMAP-Server (für E-Mail-Empfang) Eingehend von alle zulassen" auf verweigern setze, ist wirklich keine Verbindung mehr möglich. Das Problem ist jedoch, dass dann auch keine mehr auf Port 993 möglich ist.
Testweise habe ich den Spiess umgedreht und die "IMAP-Server" Regel auf verweigern gesetzt und explizit nur Port 993 freigegeben. Leider ergibt dies das selbe Phänomen. Verbindung auf Port 143 ist weiterhin möglich. Leider verstehe ich nicht warum das so ist.

Eig. sollte doch, da die Regeln von oben nach unten abgearbeitet werden, in der ersten Konfiguration der Port 143 gesperrt sein, oder?

Wie muss ich die Firewall richtig konfigurieren, damit nur auf Port 993 Verbindungen angenommen werden?


Hier der Auszug aus IPTables (iptables -L):
Chain INPUT (policy DROP)
target     prot opt source               destination         
fail2ban-default  tcp  --  anywhere             anywhere             multiport dports smtp,urd,submission
fail2ban-plesk-login  tcp  --  anywhere             anywhere             multiport dports 8880,8443
fail2ban-BadBots  tcp  --  anywhere             anywhere             multiport dports http,https,7080,7081
fail2ban-apache  tcp  --  anywhere             anywhere             multiport dports http,https,7080,7081
fail2ban-plesk-roundcube  tcp  --  anywhere             anywhere             multiport dports http,https,7080,7081
fail2ban-plesk-horde  tcp  --  anywhere             anywhere             multiport dports http,https,7080,7081
fail2ban-plesk-dovecot  tcp  --  anywhere             anywhere             multiport dports imap2,imap3,imaps,pop3,pop3s,sieve
fail2ban-plesk-postfix  tcp  --  anywhere             anywhere             multiport dports smtp,urd,submission
fail2ban-plesk-proftpd  tcp  --  anywhere             anywhere             multiport dports ftp,ftp-data,ftps,ftps-data
fail2ban-recidive  tcp  --  anywhere             anywhere            
fail2ban-SSH  tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
REJECT     tcp  --  anywhere             anywhere             tcp flags:!FIN,SYN,RST,ACK/SYN state NEW reject-with tcp-reset
DROP       all  --  anywhere             anywhere             state INVALID
ACCEPT     all  --  anywhere             anywhere            
DROP       tcp  --  anywhere             anywhere             tcp dpt:imap2
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8443
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8880
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:urd
DROP       tcp  --  anywhere             anywhere             tcp dpt:pop3
DROP       tcp  --  anywhere             anywhere             tcp dpt:pop3s
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:imap2
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:imaps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:poppassd
DROP       tcp  --  anywhere             anywhere             tcp dpt:mysql
DROP       tcp  --  anywhere             anywhere             tcp dpt:postgresql
DROP       tcp  --  anywhere             anywhere             tcp dpt:9008
DROP       tcp  --  anywhere             anywhere             tcp dpt:9080
DROP       udp  --  anywhere             anywhere             udp dpt:netbios-ns
DROP       udp  --  anywhere             anywhere             udp dpt:netbios-dgm
DROP       tcp  --  anywhere             anywhere             tcp dpt:netbios-ssn
DROP       tcp  --  anywhere             anywhere             tcp dpt:microsoft-ds
DROP       udp  --  anywhere             anywhere             udp dpt:openvpn
DROP       udp  --  anywhere             anywhere             udp dpt:domain
DROP       tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     icmp --  anywhere             anywhere             icmptype 8 code 0
DROP       all  --  anywhere             anywhere            

Chain FORWARD (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
REJECT     tcp  --  anywhere             anywhere             tcp flags:!FIN,SYN,RST,ACK/SYN state NEW reject-with tcp-reset
DROP       all  --  anywhere             anywhere             state INVALID
ACCEPT     all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            

Chain OUTPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
REJECT     tcp  --  anywhere             anywhere             tcp flags:!FIN,SYN,RST,ACK/SYN state NEW reject-with tcp-reset
DROP       all  --  anywhere             anywhere             state INVALID
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
...(Fail2Ban Chains)...

Vielen Dank im Voraus!

Liebe Grüße
NetworkUser

Content-Key: 278523

Url: https://administrator.de/contentid/278523

Ausgedruckt am: 28.03.2024 um 22:03 Uhr