Re: qmail, tcpserver rules werden ignoriert
Hallo Liste, lieber D. Ich habe gemäss den Regeln folgendes gemacht: linux:~ # less /etc/tcp.smtp 127.0.0.1:deny 192.168.1.100:allow,RELYCLIENT="" :allow linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb 127.0.0.1 rule : allow connection linux:~ # Gemäss den Regeln sollte ja 127.0.0.1 ein deny erhalten. Nach dem Verpacken habe ich das ganze nun also mit tcprulescheck angeschaut und siehe da: Er kümmert sich keinen Deut um diese cdb. Es kommt noch dicker. Obwohl ich nur meine Domains in rcpthosts habe und obige tcp.smtp verwende (nat. mit 127.0.0.1 als allow,RELAYCLIENT) bin ich ein offener Relay-Server!!! Kann mir das bitte jemand erklären??? Ich scheine wirklich dähmlich zu sein. Liebe Grüsse Michael
Hallo Liste mir ist da ein Typo passiert: 127.0.0.1:deny 192.168.1.100:allow,RELYCLIENT="" :allow Heisst natürlich schon RELAYCLIENT="". Keine Angst, das ist nicht der Grund warum es nicht klappt Gruss Michael
Michael Rolli wrote:
Hallo Liste, lieber D.
Ich habe gemäss den Regeln folgendes gemacht:
linux:~ # less /etc/tcp.smtp 127.0.0.1:deny 192.168.1.100:allow,RELYCLIENT="" :allow linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb 127.0.0.1 rule : allow connection linux:~ #
Gemäss den Regeln sollte ja 127.0.0.1 ein deny erhalten. Nach dem Verpacken habe ich das ganze nun also mit tcprulescheck angeschaut und siehe da: Er kümmert sich keinen Deut um diese cdb. Es kommt noch dicker. Obwohl ich nur meine Domains in rcpthosts habe und obige tcp.smtp verwende (nat. mit 127.0.0.1 als allow,RELAYCLIENT) bin ich ein offener Relay-Server!!! Kann mir das bitte jemand erklären??? Ich scheine wirklich dähmlich zu sein.
Hm, da truegt mich dann wohl meine Erinnerung? Versuch doch mal ein: TCPRREMOTEIP=127.0.0.1; tcprulescheck tcp.smtp.cdb und TCPRREMOTEIP=192.168.1.100; tcprulescheck tcp.smtp.cdb Daniel
Hallöle alle miteinander Tja, Daniel, auch nicht wirklich. linux:~ # less /etc/tcp.smtp 127.0.0.1:deny 192.168.1.100:allow,RELAYCLIENT="" :allow linux:~ # TCPREMOTEIP=127.0.0.1; tcprulescheck /etc/tcp.smtp.cdb rule : allow connection So sieht's dann also aus. Also weiter geprobt: linux:~ # less /etc/tcp.smtp :deny linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb rule : deny connection linux:~ # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. So weit, so gut. Dann: linux:~ # less /etc/tcp.smtp 127.0.0.1:allow :deny linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb rule : deny connection linux:~ # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 linux.mydomain.com ESMTP (host aus me) helo 250 linux.mydomain.com mail test@test.com 250 ok rcpt test@anything.any 250 ok Jetzt müsste doch rcpthosts greifen, da die Umgebungsvariable RELAYCLIENT nicht gesetzt ist, oder? Weshalb nur nimmt er die Domain anything.any als RCPT an? Steht ja schliesslich bestimmt nicht in meiner rcpthosts??? Unglaublich! Als ob RELAYCLIENT immer gesetzt ist! Irgendwelche Ideen? Gruss Michael
Michael Rolli wrote:
Hallöle alle miteinander
Tja, Daniel, auch nicht wirklich.
linux:~ # less /etc/tcp.smtp 127.0.0.1:deny 192.168.1.100:allow,RELAYCLIENT="" :allow linux:~ # TCPREMOTEIP=127.0.0.1; tcprulescheck /etc/tcp.smtp.cdb rule : allow connection
So sieht's dann also aus. Also weiter geprobt:
linux:~ # less /etc/tcp.smtp :deny linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb rule : deny connection linux:~ # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host.
So weit, so gut. Dann:
linux:~ # less /etc/tcp.smtp 127.0.0.1:allow :deny linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb rule : deny connection linux:~ # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 linux.mydomain.com ESMTP (host aus me) helo 250 linux.mydomain.com mail test@test.com 250 ok rcpt test@anything.any 250 ok
Jetzt müsste doch rcpthosts greifen, da die Umgebungsvariable RELAYCLIENT nicht gesetzt ist, oder? Weshalb nur nimmt er die Domain anything.any als RCPT an? Steht ja schliesslich bestimmt nicht in meiner rcpthosts???
Unglaublich! Als ob RELAYCLIENT immer gesetzt ist! Irgendwelche Ideen?
Gruss Michael
Hm ...: #cat /etc/tcprules/smtp.rules 127.0.0.1:deny 192.168.1.100:allow,RELAYCLIENT="" :allow #tcprules /etc/tcprules/smtp.cdb /tmp/smtp.tmp< /etc/tcprules/smtp.rules #export TCPREMOTEIP=127.0.0.1 #tcprulescheck /etc/tcprules/tcp.cdb rule 127.0.0.1: deny connection # export TCPREMOTEIP=192.168.1.100 ; tcprulescheck /etc/tcprules/smtp.cdb rule 192.168.1.100: set environment variable RELAYCLIENT= allow connection #unset TCPREMOTEIP #tcprulescheck /etc/tcprules/smtp.cdb rule : allow connection # *grrr* Wenn das Woertchen export nicht waer ... sorry Daniel
participants (2)
-
D.Wolpert
-
Michael Rolli