Titel: proftpd anonymous problem Beitrag von: christian8287 am 28. Januar 2006, 22:18:26 Hallo!
Ich will einen ftp-server für downloads und apt repositorys aufsetzen. Dazu brauche ich einen mit anonymous-funktion. Ich habe jetzt einiges probiert, aber ich kann mich nicht einloggen. Hier ist meine Config: Code: server:/home/admin# cat /etc/proftpd.conf # # /etc/proftpd.conf -- This is a basic ProFTPD configuration file. # To really apply changes reload proftpd after modifications. # ServerName "Debian" ServerType standalone DeferWelcome off MultilineRFC2228 on DefaultServer on ShowSymlinks on TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200 DisplayLogin welcome.msg DisplayFirstChdir .message ListOptions "-l" DenyFilter \*.*/ # Uncomment this if you are using NIS or LDAP to retrieve passwords: #PersistentPasswd off # Uncomment this if you would use TLS module: #TLSEngine on # Uncomment this if you would use quota module: #Quotas on # Uncomment this if you would use ratio module: #Ratios on # Port 21 is the standard FTP port. Port 21 # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd) MaxInstances 30 # Set the user and group that the server normally runs at. User ftp Group nogroup # Umask 022 is a good standard umask to prevent new files and dirs # (second parm) from being group and world writable. Umask 022 022 # Normally, we want files to be overwriteable. AllowOverwrite on # Delay engine reduces impact of the so-called Timing Attack described in # http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02 # It is on by default. #DelayEngine off <Global> # Ausgabe bei Fehlanmeldung und erfolgreicher Anmeldung AccessDenyMsg "Keine Anmeldung für %u möglich" AccessGrantMsg "Anmeldung erfolgreich. Hallo und Willkommen %u " # Verbindung trennen nach ... Sekunden, wenn Klient nicht mehr erreichbar, # Klient nur eingeloggt, aber ohne Aktion, oder # sich zu lange Zeit lässt beim Einloggen :) TimeOutStalled 240 TimeOutIdle 240 TimeOutLogin 240 # Portbereich festlegen PassivePorts 40000 50000 </Global> # A basic anonymous configuration, no upload directories. <Anonymous ~ftp> User ftp Group nogroup # # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp MaxClients 04 <Limit WRITE> DenyAll </Limit> # # Cosmetic changes, all files belongs to ftp user # DirFakeUser on ftp # DirFakeGroup on ftp # # RequireValidShell off # # # Limit the maximum number of anonymous logins # MaxClients 10 # # # We want 'welcome.msg' displayed at login, and '.message' displayed # # in each newly chdired directory. # DisplayLogin welcome.msg # DisplayFirstChdir .message # # # Limit WRITE everywhere in the anonymous chroot # <Directory *> # <Limit WRITE> # DenyAll # </Limit> # </Directory> # # # Uncomment this if you're brave. # # <Directory incoming> # # # Umask 022 is a good standard umask to prevent new files and dirs # # # (second parm) from being group and world writable. # # Umask 022 022 # # <Limit READ WRITE> # # DenyAll # # </Limit> # # <Limit STOR> # # AllowAll # # </Limit> # # </Directory> # </Anonymous> Hier ist der Fehler: Code: christian@christian:~$ ftp christiankloimuellner.gnx.at Connected to christiankloimuellner.gnx.at. 220 ProFTPD 1.2.9 Server (Debian) [s-ar4.arweb.at] Name (christiankloimuellner.gnx.at:christian): anonymous 331 Password required for anonymous. Password: 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> Weiß jemand Rat? Danke! lg, christian. Titel: proftpd anonymous problem Beitrag von: Anonymous am 28. Januar 2006, 22:21:06 Komisch ist auch noch folgendes:
Code: christian@christian:~$ ftp 10.0.1.4 Connected to 10.0.1.4. 220 ProFTPD 1.2.10 Server (Debian) [10.0.1.4] Name (10.0.1.4:christian): ftp 331 Anonymous login ok, send your complete email address as your password. Password: 530 Keine Anmeldung für ftp möglich Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> Mit der lokalen IP bekomme ich ein anderes Ergebnis? Wird immer rätselhafter! lg, Christian. Titel: proftpd anonymous problem Beitrag von: VolGas am 29. Januar 2006, 08:40:52 Hallo!
Setze zuerst einmal RequireValidShell auf "off", das ist nämlich auskommentiert, wird aber gebraucht. Falls Dein Server hinter einem Router / einer Firewall steht, dann muß auch noch mit MasqueradeAddress (http://www.proftpd.de/Direktiven.54.0.html#97) gearbeitet werden. Lokal einloggen geht dann aber nicht mehr direkt. Ich würde daher empfehlen, alles zuerst einmal lokal zum laufen zu bekommen... mfg. VolGas Titel: proftpd anonymous problem Beitrag von: christian8287 am 29. Januar 2006, 09:33:32 Super, danke für die Hilfe!
Ich hab jetzt den Parameter RequireValidShell auskommentiert. Jetzt kann ich mich aber mit ftp 10.0.1.4 nicht mehr anmelden probieren. Mit ftp christiankloimuellner.gnx.at geht es komischerweise: Code: christian@rudi:~$ ftp 10.0.1.4 Connected to 10.0.1.4. 421 Service not available, remote server has closed connection ftp> Code: christian@rudi:~$ ftp christiankloimuellner.gnx.at Connected to christiankloimuellner.gnx.at. 220 ProFTPD 1.2.9 Server (Debian) [s-ar4.arweb.at] Name (christiankloimuellner.gnx.at:christian): anonymous 331 Password required for anonymous. Password: 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> Aber der anonymous Zugang funktioniert noch immer nicht. Weißt du warum? Eigentlich hab ich den anonymous Zugang richtig "freigeschalten" mit den Tags. Wie du schon richtig vermutet hast, befindet sich mein Server hinter einem Router. Diesbezüglich muss ich mir eh noch was überlegen. Ich denke, dass passives FTP verwendet wird, daher müsste ich mir Ports ausmachen und dann am Router freischalten oder so ähnlich. Aber wie du schon gesagt hast, wär es mal super es lokal zum laufen zu bringen! Danke für die Hilfe! lg, Christian. Titel: proftpd anonymous problem Beitrag von: christian8287 am 29. Januar 2006, 14:19:27 Ok, anscheinend funktioniert der ftp-server mal lokal mit anonymous zugang:
Code: christian@rudi:~$ ftp 10.0.1.4 Connected to 10.0.1.4. 220 ProFTPD 1.2.10 Server (Debian) [10.0.1.4] Name (10.0.1.4:christian): anonymous 331 Anonymous login ok, send your complete email address as your password. Password: 230-Welcome, archive user anonymous@10.0.1.101 ! 230- 230-The local time is: Sun Jan 29 14:12:41 2006 230- 230-This is an experimental FTP server. If have any unusual problems, 230-please report them via e-mail to <root@localhost.localdomain>. 230- 230 Anonymous access granted, restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. Aber leider geht es außerhalb noch nicht: Code: christian@rudi:~$ ftp christiankloimuellner.gnx.at Connected to christiankloimuellner.gnx.at. 220 ProFTPD 1.2.9 Server (Debian) [s-ar4.arweb.at] Name (christiankloimuellner.gnx.at:christian): anonymous 331 Password required for anonymous. Password: 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> Leider weiß ich jetzt nicht was ich ändern kann damit es funktioniert. Am Router hab ich eine DMZ eingeschalten. Also sollten alle Ports auf meinen Server weitergeleitet werden und daher sollte es auch funktionieren. Komisch kommt mir vor, dass er immer sagt, Password required for anonymous. aber warum? Hier nochmal meine neue config: Code: server:/home/ftp# cat /etc/proftpd.conf ServerName "Debian" ServerType inetd DeferWelcome off MultilineRFC2228 on DefaultServer on ShowSymlinks on TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200 DisplayLogin welcome.msg DisplayFirstChdir .message ListOptions "-l" DenyFilter \*.*/ Port 21 MaxInstances 30 User nobody Group nogroup Umask 022 022 AllowOverwrite on <Anonymous ~ftp> User ftp Group nogroup UserAlias anonymous ftp RequireValidShell off MaxClients 10 DisplayLogin welcome.msg DisplayFirstChdir .message <Directory *> <Limit WRITE> DenyAll </Limit> </Directory> </Anonymous> Danke! lg, Christian. Titel: proftpd anonymous problem Beitrag von: VolGas am 29. Januar 2006, 16:24:59 Jeder FTP-Client sollte nur im "passive mode" arbeiten.
Um die zu benutzenden Ports zu definieren, würde ich noch in die proftpd.conf z.B. "PassivePorts 50000 52000" schreiben. Um Deinen FTP-Server von "außen" zu erreichen, brauchst Du eben "MasqueradeAddress", damit nicht die interne IP-Adresse für den passiven Modus benutzt wird. Den Server in eine DMZ zu stellen ist nicht notwendig und finde ich auch nicht so gut. Aber zu Testzwecken kann man das ruhig einmal machen. Auch bei einem anonymen FTP-Zugang wird nach einem Passwort gefragt, das ist ganz normal. Historisch gesehen sollte hier jeder "anonymous" seine eMail-Adresse eingeben, aber das macht heute fast keiner mehr. Ich hoffe, Du kommst damit nun ein Stückchen weiter. mfg. VolGas Titel: proftpd anonymous problem Beitrag von: stonki am 29. Januar 2006, 21:48:36 da werden zwei verschiedene FTP Server angesprochen. Denn einmal ProFTPD 1.2.9 und einmal 1.2.10. Read the fucking output !
Titel: proftpd anonymous problem Beitrag von: VolGas am 30. Januar 2006, 05:36:08 @stonki:
Uups... Sorry, das ist mir entgangen, wer rechnet denn mit sowas? Warum denn gleich so ruppig? Ich bin durchaus nicht böse, wenn man mir beim helfen hilft... ;) @christian8287 Wie kommt denn nun das zustande? Hast Du zwei Server am Laufen? mfg. VolGas Titel: proftpd anonymous problem Beitrag von: stonki am 30. Januar 2006, 06:21:09 Zitat von: "VolGas" @stonki: Uups... Sorry, das ist mir entgangen, wer rechnet denn mit sowas? Warum denn gleich so ruppig? Ich bin durchaus nicht böse, wenn man mir beim helfen hilft... ;) ne, meinte Dich auch nicht, sondern den Fragesteller.. Vielen Dank fuer Deine Hilfe anyway. Wenn Du mal nach Hamburg kommst muessen wir paar trinken gehen Titel: proftpd anonymous problem Beitrag von: Anonymous am 30. Januar 2006, 06:42:12 Das ist mir wirklich nie aufgefallen :shock: . Na ja ich hab geschaut, ob ich irgendwo einen anderen Server finden kann, aber da ist nichts. Ich schreib hier nochmal ein paar Ausgaben hin, vielleicht hilft das bei der Problemlösung.
Suche nach proftp auf dem ganzen Computer: Code: server:/# /etc/init.d/inetd restart Restarting internet superserver: inetd. You have new mail in /var/mail/admin server:/# cd /var/mail/admin bash: cd: /var/mail/admin: Ist kein Verzeichnis server:/# vi /var/mail/admin server:/# /etc/init.d/inetd restart Restarting internet superserver: inetd. server:/# vi /etc/inetd.conf server:/# find / -name *proftp* /etc/default/proftpd /etc/pam.d/proftpd /etc/init.d/proftpd /etc/rc0.d/K50proftpd /etc/rc1.d/K50proftpd /etc/rc2.d/S50proftpd /etc/rc3.d/S50proftpd /etc/rc4.d/S50proftpd /etc/rc5.d/S50proftpd /etc/rc6.d/K50proftpd /etc/cron.monthly/proftpd /etc/proftpd.conf /var/lib/dpkg/info/proftpd-common.postrm /var/lib/dpkg/info/proftpd-common.list /var/lib/dpkg/info/proftpd-common.conffiles /var/lib/dpkg/info/proftpd-common.md5sums /var/lib/dpkg/info/proftpd.config /var/lib/dpkg/info/proftpd.list /var/lib/dpkg/info/proftpd.templates /var/lib/dpkg/info/proftpd.postinst /var/lib/dpkg/info/proftpd.preinst /var/lib/dpkg/info/proftpd.prerm /var/lib/dpkg/info/proftpd.postrm /var/lib/dpkg/info/proftpd.conffiles /var/lib/dpkg/info/proftpd.md5sums /var/cache/apt/archives/proftpd-common_1.2.10-15sarge1.0.1_i386.deb /var/cache/apt/archives/proftpd_1.2.10-15sarge1.0.1_i386.deb /var/run/proftpd /var/run/proftpd/proftpd.delay /var/run/proftpd/proftpd.scoreboard /usr/share/doc/proftpd-common /usr/share/doc/proftpd /usr/share/doc/proftpd/examples/proftpd.conf /usr/share/man/man8/proftpd.8.gz /usr/share/man/man5/proftpd.conf.5.gz /usr/sbin/proftpd Eintrag in der /etc/inetd.conf: Code: ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/proftpd Ausgabe der laufenden Prozesse mittels ps aux: Code: server:/var/run/proftpd# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 1504 512 ? S 06:16 0:00 init [2] root 2 0.0 0.0 0 0 ? SN 06:16 0:00 [ksoftirqd/0] root 3 0.2 0.0 0 0 ? S< 06:16 0:03 [events/0] root 4 0.0 0.0 0 0 ? S< 06:16 0:00 [khelper] root 5 0.0 0.0 0 0 ? S< 06:16 0:00 [kacpid] root 34 0.0 0.0 0 0 ? S< 06:16 0:00 [kblockd/0] root 44 0.0 0.0 0 0 ? S 06:16 0:00 [pdflush] root 45 0.0 0.0 0 0 ? S 06:16 0:00 [pdflush] root 47 0.0 0.0 0 0 ? S< 06:16 0:00 [aio/0] root 46 0.0 0.0 0 0 ? S 06:16 0:00 [kswapd0] root 189 0.0 0.0 0 0 ? S 06:16 0:00 [kseriod] root 293 0.0 0.0 0 0 ? S 06:16 0:00 [kjournald] root 792 0.0 0.0 0 0 ? S 06:16 0:00 [khubd] root 1036 0.0 0.0 0 0 ? S 06:16 0:00 [pciehpd_event] root 1056 0.0 0.0 0 0 ? S 06:16 0:00 [shpchpd_event] root 1318 0.0 0.0 0 0 ? S 06:17 0:00 [khpsbpkt] root 1331 0.0 0.0 0 0 ? S 06:17 0:00 [knodemgrd_0] root 1612 0.0 0.0 0 0 ? S 06:17 0:00 [kIrDAd] root 1758 0.0 0.1 1676 680 ? Ss 06:17 0:00 dhclient -e -pf /root 2116 0.0 0.1 1560 632 ? Ss 06:17 0:00 /sbin/syslogd root 2119 0.0 0.2 2440 1504 ? Ss 06:17 0:00 /sbin/klogd Debian- 2155 0.0 0.2 4440 1536 ? Ss 06:17 0:00 /usr/sbin/exim4 -root 2165 0.0 0.3 5596 1940 ? Ss 06:17 0:00 /usr/sbin/nmbd -Droot 2171 0.0 0.2 3468 1504 ? Ss 06:17 0:00 /usr/sbin/sshd daemon 2184 0.0 0.1 1684 628 ? Ss 06:17 0:00 /usr/sbin/atd root 2187 0.0 0.1 1756 716 ? Ss 06:17 0:00 /usr/sbin/cron root 2265 0.0 0.0 1500 484 tty1 Ss+ 06:17 0:00 /sbin/getty 38400root 2271 0.0 0.0 1500 484 tty2 Ss+ 06:17 0:00 /sbin/getty 38400root 2272 0.0 0.0 1500 484 tty3 Ss+ 06:17 0:00 /sbin/getty 38400root 2273 0.0 0.0 1500 484 tty4 Ss+ 06:17 0:00 /sbin/getty 38400root 2274 0.0 0.0 1500 484 tty5 Ss+ 06:17 0:00 /sbin/getty 38400root 2275 0.0 0.0 1500 484 tty6 Ss+ 06:17 0:00 /sbin/getty 38400root 2331 0.0 0.3 14452 1984 ? Ss 06:17 0:00 sshd: admin [privadmin 2334 0.0 0.3 14460 2040 ? R 06:17 0:00 sshd: admin@pts/0admin 2335 0.0 0.3 3020 1628 pts/0 Ss 06:17 0:00 -bash root 2340 0.0 0.3 3224 1836 pts/0 R 06:17 0:00 bash root 3189 0.0 0.5 7220 2800 ? Ss 06:25 0:00 /usr/sbin/apache2www-data 3191 0.0 0.4 7012 2572 ? S 06:25 0:00 /usr/sbin/apache2www-data 3192 0.0 0.5 228440 2940 ? S 06:25 0:00 /usr/sbin/apache2www-data 3198 0.0 0.5 228440 2940 ? S 06:25 0:00 /usr/sbin/apache2aptproxy 3277 0.0 1.6 12276 8652 ? Ss 06:25 0:00 /usr/bin/python2.root 3449 0.0 0.1 1540 544 ? Ss 06:27 0:00 /usr/sbin/inetd root 3456 0.0 0.1 2496 844 pts/0 R+ 06:33 0:00 ps aux Ich habe ebenfalls versucht proftpd vollkommen neu zu installieren: Code: apt-get remove --purge proftpd ucf rm -r $(find / -name *proftp*) apt-get install proftpd Es gibt eigentlich keine Anzeichen dafür, dass ein zweiter Server läuft, obwohl es so ist. Ich hab auch, wie oben im output ersichtlich, keine zweite config Datei gefunden. Bezüglich der DMZ: Die werde ich später sowieso wieder abschalten. Die ist wirklich nur für Testzwecke gedacht, bis das ganze dann funktioniert. Eine Idee hätte ich noch: protpd verwendet ja ähnlich zum apache Virtuelle Hosts. Vielleicht horcht das Programm auf eine interne und auf eine externe IP-Adresse. Eigentlich sollte das ja nicht der Fall sein, weil ich ja keine virtuellen Hosts in der config Datei angegeben habe. Danke! lg, Christian. Titel: proftpd anonymous problem Beitrag von: VolGas am 30. Januar 2006, 07:15:09 Hmpf...
1.) Wenn Du Dir mit dem globalen Rundumschlag mit "rm -r $(find / -name *proftp*)" nur mal keinen Bärendienst erwiesen hast! Das würde ich mich -gerade bei Debain!- ganz bestimmt nicht trauen! 2.) Ich kann nur empfehlen, den ProFTPD als Standalone laufen zu lassen. IMHO gibt es heutzutage keinen Grund mehr, den inetd überhaupt noch zu benutzen. 3.) es gibt in ProFTPD zwar so etwas wie virtuelle Hosts, die funktionieren aber anders als beim Apache. Aber die müssen -wie auch beim Indianer- definiert sein und wechseln auch nicht gerade mal so die IP - und schon gar nicht die Versionsnummer! 4.) ich hab' keinen Durchblick und -ehrlich gesagt- auch keine Lust mehr und gebe mich hiermit offiziell geschlagen. Vielleicht kann Dir jemand anderes weiterhelfen, sorry... mfg. VolGas |