PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : habe offenes relay, wie kann ich es finden und schliessen?



berhard
20.05.04, 11:50
Hallo,

ich habe durch einen relay-test.mail-abuse.org Test festgestellt, dass ich ein offenes Relay habe, finde es aber leider nicht? Wie kann ich es finden und schliessen?
Ich habe SuSE 8.1, qmail, vpopmail, SMTP-AUTH
Ich habe die Logdatein von Qmail verraten mir nichts. da ist alles okay.

root:/ # telnet relay-test.mail-abuse.org
Trying 168.61.4.13...
Connected to relay-test.mail-abuse.org.
Escape character is '^]'.
Connecting to 182.155.33.215 ...
<<< 220 root.meinserver.de ESMTP
>>> HELO cygnus.mail-abuse.org
<<< 250 root.meinserver.de
:Relay test: #Quote test
>>> mail from: <spamtest@meinedomain.de>
<<< 250 ok
>>> rcpt to: <"nobody@mail-abuse.org">
<<< 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 1
>>> mail from: <nobody@mail-abuse.org>
<<< 250 ok
>>> rcpt to: <nobody@mail-abuse.org>
<<< 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 2
>>> mail from: <spamtest@maps1.pa.vix.com>
<<< 553 sorry, your envelope sender domain must exist (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #test 3
>>> mail from: <spamtest@localhost>
<<< 553 sorry, your envelope sender domain must exist (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 4
>>> mail from: <spamtest>
<<< 250 ok
>>> rcpt to: <nobody@mail-abuse.org>
<<< 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 5
>>> mail from: <>
<<< 250 ok
>>> rcpt to: <nobody@mail-abuse.org>
<<< 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 6
>>> mail from: <spamtest@meinedomain.de>
<<< 250 ok
>>> rcpt to: <nobody@mail-abuse.org>
<<< 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 7
>>> mail from: <spamtest@[182.155.33.215]>
<<< 250 ok
>>> rcpt to: <nobody@mail-abuse.org>
<<< 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>>> rset
<<< 250 flushed
:Relay test: #Test 8
>>> mail from: <spamtest@meinedomain.de>
<<< 250 ok
>>> rcpt to: <nobody%mail-abuse.org@meinedomain.de>
<<< 550 sorry, no mailbox here by that name (#5.1.1 - chkusr)
>>> rset
<<< 250 flushed
:Relay test: #Test 9
>>> mail from: <spamtest@meinedomain.de>
<<< 250 ok
>>> rcpt to: <nobody%mail-abuse.org@[182.155.33.215]>
<<< 250 ok
>>> QUIT
<<< 221 root.meinserver.de
Tested host banner: 220 root.meinserver.de ESMTP
System appeared to accept 1 relay attempts
Connection closed by foreign host.
root:/ # netstat -tupan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:20000 0.0.0.0:* LISTEN 355/perl
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 610/couriertcpd
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 10444/tcpserver
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 10442/tcpserver
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 596/couriertcpd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 567/httpd
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 362/perl
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 433/xinetd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 353/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10440/tcpserver
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 567/httpd
tcp 0 240 182.155.33.215:22 82.83.137.200:2176 ESTABLISHED 29815/sshd
tcp 0 0 182.155.33.215:22 82.83.137.200:2243 ESTABLISHED 30831/sshd
udp 0 0 0.0.0.0:10000 0.0.0.0:* 362/perl
udp 0 0 0.0.0.0:20000 0.0.0.0:* 355/perl
udp 63936 0 0.0.0.0:68 0.0.0.0:* 303/dhcpcd
udp 0 0 182.155.33.215:123 0.0.0.0:* 505/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 505/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 505/ntpd
root:/ # lsof -i -n
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
dhcpcd 303 root 4u IPv4 533 UDP *:bootpc
sshd 353 root 3u IPv4 1189 TCP *:ssh (LISTEN)
miniserv. 355 root 3u IPv4 1193 TCP *:dnp (LISTEN)
miniserv. 355 root 4u IPv4 1194 UDP *:dnp
miniserv. 362 root 4u IPv4 1206 TCP *:ndmp (LISTEN)
miniserv. 362 root 5u IPv4 1207 UDP *:ndmp
xinetd 433 root 5u IPv4 116100 TCP *:ftp (LISTEN)
ntpd 505 ntp 4u IPv4 2013 UDP *:ntp
ntpd 505 ntp 5u IPv4 2014 UDP 127.0.0.1:ntp
ntpd 505 ntp 6u IPv4 2015 UDP 182.155.33.215:ntp
httpd 567 root 52u IPv4 3410 TCP *:https (LISTEN)
httpd 567 root 53u IPv4 3411 TCP *:http (LISTEN)
couriertc 596 root 5u IPv4 3442 TCP *:imap (LISTEN)
couriertc 610 root 5u IPv4 3465 TCP *:imaps (LISTEN)
httpd 8594 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8594 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8595 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8595 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8596 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8596 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8597 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8597 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8598 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8598 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8603 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8603 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8611 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8611 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8612 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8612 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8619 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8619 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
httpd 8620 wwwrun 52u IPv4 3410 TCP *:https (LISTEN)
httpd 8620 wwwrun 53u IPv4 3411 TCP *:http (LISTEN)
tcpserver 10440 vpopmail 3u IPv4 108334 TCP *:smtp (LISTEN)
tcpserver 10442 vpopmail 3u IPv4 108336 TCP *:pop3 (LISTEN)
tcpserver 10444 vpopmail 3u IPv4 108326 TCP *:pop3s (LISTEN)
sshd 29815 root 4u IPv4 194608 TCP 182.155.33.215:ssh 82.83.137.200:2176 (ESTABLISHED)
sshd 30831 root 4u IPv4 197305 TCP 182.155.33.215:ssh 82.83.137.200:magicom (ESTABLISHED)

Windoofsklicker
20.05.04, 13:21
Hallo,

log dich mal auf deinen Server ein, mach ein nmap auf das externe Interface und schau mal, was dort für Ports offen sind.
Das gleiche lässt du mal von z.B. http://scan.sygate.com wiederholen und vergleichst mal die Ergebnisse.

Dein Mail-Server lauscht i.d.R. auf Port 25. Du kannst den Port dann entweder auf dem externen Interface schliessen, je nachdem, wie du Mails abholst. Die bessere Lösung wäre allerdings, deinen Mail-Server auf ein Interface zu binden.

Mach mal einen Telnet auf Port 25 an deinem Server. Da kannst du dann sehen, welcher Mail Server bei dir läuft.

Pingu
20.05.04, 14:25
Hi,

ich habe kein qmail, weiß deshalb nicht wie man es konfiguriert. Aber das Loch ist doch wohl eindeutig:

:Relay test: #Test 9
>>> mail from: <spamtest@meinedomain.de>
<<< 250 ok
>>> rcpt to: <nobody%mail-abuse.org@[182.155.33.215]>
<<< 250 ok
>>> QUIT
<<< 221 root.meinserver.de

Dein email Server hat die email angenommen, obwohl sie gar nicht für ihn, sondern an <nobody@mail-abuse.org> weiterleiten soll.

Pingu

berhard
21.05.04, 10:59
erstmal vielen Dank für die Antwort. nmap sagt bei mir:

PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
143/tcp open imap
443/tcp open https
993/tcp open imaps
995/tcp open pop3s
10000/tcp open snet-sensor-mgmt

Ich finde dabei kein Programm, was ohne mein wissen läuft. Also kann es ja nur bei Qmail liegen, das Problem des offenen Ports, oder?!

Telnet auf port 25 sagt:
~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 a15150996.alturo-server.de ESMTP

PS: wie kan ich den http://scan.sygate.com/ Test machen?

Pingu
21.05.04, 12:38
Ok, nocheinmal

offenes Relay == fehlerhaft konfigurierter MTA (Mail Transport Agent)

In Deinem Fall ist der MTA qmail.

Das Ganze hat nichts mit offenen Port oder was auch immer zu tun. Also vergiss alles andere. Für Dich ist nur qmail wichtig bezogen auf dein angesprochenes Problem.
Dazu habe ich Dir auch schon den Hinweise, wie der Test dazukam zu denken, Du hast ein offenes Relay.

Leßt Ihr Euch auch manchmal die Reports durch oder schaut Ihr nur auf den Rot oder Grün Button??????

Pingu

Dewitt
21.05.04, 13:54
Vielleicht hilft dir dies hier weiter: http://www.tek-tips.com/gviewthread.cfm/lev2/3/lev3/15/pid/856/qid/606284

Bye,
Dennis

Jaydee
21.05.04, 13:59
Hallo,

wie kann ich mail-abuse.org überhaupt dazu bewegen mich auf ein offenes Relay zu testen?


Gruß Alex

Pingu
21.05.04, 14:26
Hallo,

wie kann ich mail-abuse.org überhaupt dazu bewegen mich auf ein offenes Relay zu testen?
Die Antwort findest Du dazu auf der Website von?

Some of the frequently asked questions about the MAPS(sm) Relay Spam Stopper. (http://work-rss.mail-abuse.org/rss/faq.html)
How do you prove that a machine is an open relay?
After receiving evidence of a relay having been used for spam, we perform a single relay test ourselves.

How come you don't automatically retest servers to see if they're closed?
Overall, we feel that'd be abusive. Like noted above, most servers that are open to relay continue to be open to relay for a medium-to-long while. If we constantly poked at those servers, we'd just make the administrators angrier at us. We'd like them to focus on the real problem of spam relay, instead of on us. As such, we generally don't test a server for possible removal unless requested to do so by a representative of the organization that operates the server.

Pingu