www.ProFTPD.de
13. März 2007, 19:13:46 *
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge
News: SMF - Neu installiert!
 
   Übersicht   Hilfe Suche Login Registrieren  
Seiten: [1]   Nach unten
  Drucken  
Autor Thema: TLSRequired für bestimmte IP auf 'off' stellen  (Gelesen 273 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« am: 24. Dezember 2006, 22:27:46 »

Hi,

ich habe einen ProFTPD 1.2.10 auf einem Debian Sarge 2.6.17-2-vserver-686.
'TLSRequired on' ist eingestellt, für anonymous ist es 'off'. Dies läuft einwandfrei, nun möchte ich aber für eine bestimmte IP TLSRequired ebenfalls auf 'off' stellen. Folgender Code erfüllt dies aber nicht
Code:
<Class nossl>
   From 123.123.123.123
</Class>
<IfClass !nossl>
  TLSRequired on
</IfClass>
<IfClass nossl>
  TLSRequired off
</IfClass>

Weiß jemand, was ich falsch gemacht habe?

Gespeichert
VolGas
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 771



Profil anzeigen
« Antwort #1 am: 25. Dezember 2006, 10:50:03 »

Hi!

Du scheinst Dich ja richtig gut durchgelesen und vorbereitet zu haben, deshalb verzeihe mir, wenn ich
jetzt vielleicht dumm fragen sollte: das Modul "mod_ifsession" wurde richtig, d.h. als letztes Modul beim
"configure" angegeben?

Ganz unbedarft kann ich nur sagen, daß ich Deine Konfigurationszeilen schlüssig und logisch finde und
dies auch so funktionieren sollte. Deswegen meine Vermutung, daß schon etwas beim Compilieren nicht
beachtet wurde.

Zitat
Note that mod_ifsession should be the last module in the --with-modules list, if multiple modules are listed.
This makes sure that mod_ifsession's changes will be seen properly by other modules.

Ich hoffe, das war's gewesen...

mfg.
  Volgas


Nachtrag: versuche einmal die Direktive "Classes on" - ich weiß nicht, ob das was
altes ist und noch gilt und funktioniert, aber ein Versuch scheint es mir allemal wert.
« Letzte Änderung: 25. Dezember 2006, 10:59:58 von VolGas » Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #2 am: 25. Dezember 2006, 16:52:45 »

Ich habe ProFTPD per aptitute installiert, somit kann ich nicht sagen in welcher Reihenfolge die Parameter am ./configure hingen. Wenn ich die Module abfrage erhalte ich
Code:
# /usr/sbin/proftpd -l
Compiled-in modules:
  mod_core.c
  mod_xfer.c
  mod_auth_unix.c
  mod_auth_file.c
  mod_auth.c
  mod_ls.c
  mod_log.c
  mod_site.c
  mod_auth_pam.c
  mod_quotatab.c
  mod_ratio.c
  mod_tls.c
  mod_rewrite.c
  mod_radius.c
  mod_wrap.c
  mod_quotatab_file.c
  mod_delay.c
  mod_readme.c
  mod_ifsession.c
  mod_cap.c
'mod_ifsession' steht in der vorletzten Zeile, ich weiß aber nicht, ob das relevant ist.

Bei der Zeile 'Classes on' im config file meckert der Server beim Start mit
Code:
# /etc/init.d/proftpd start
Starting ProFTPD ftp daemon:  - Fatal: Classes: deprecated. Use <Class> sections instead. on line 52 of '/etc/proftpd.conf'
.

Noch eine Angabe zu meinem Codeschnipsel vom vorherigen Post. Die IP in der 'nossl' group kann sich dann ohne SSL einloggen, jedoch ist es für keinen User, egal mit welcher IP oder ob mit bzw. ohne SSL möglich auf dem FTP zu arbeiten. Es funktioniert quasi nur der Login, aber kein LIST noch irgendwelche anderen Befehle.
Gespeichert
VolGas
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 771



Profil anzeigen
« Antwort #3 am: 25. Dezember 2006, 21:15:59 »

Na dann funktioniert es ja doch - dieser Teil zumindest...

Du hast ein Problem mit TLS: lasse Dir mit "TLSLog" ein Logfile schreiben und überprüfe dieses
oder starte den ProFTPD im Debugmodus und siehe dann nach, was passiert. Falls Du aus dem
Debug-Log nicht schlau wirst, dann poste es hier. Auch Deine proftpd.conf, um ein Konfigurations-
fehler ausschließen zu können. Außerdem: ist Dein Server hinter einer Firewall oder einer NAT?

mfg.
  VolGas
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #4 am: 26. Dezember 2006, 11:52:22 »

Das TLS Log zeigte keinen Unterschied auf. Ich habe unten ein ein Log im Level 6 angefertigt und die Differenzen herausgefiltert.
Im ersten Teil habe ich das Codestück vom ersten Post auskommentiert und mich ohne SSL verbunden.
Im zweiten Teil ist der Code aktiv, Verbindung ebenfalls ohne SSL.
Es tauchte jeweils an unterschiedlichen Stellen mehrfach 'TLSRequired' auf. Ich glaube nicht, dass das relevant ist und habe es wegelassen.

Code:
dispatching auth request "getpwnam" to module mod_radius   
dispatching auth request "getpwnam" to module mod_auth_file
dispatching auth request "getpwnam" to module mod_radius   
dispatching auth request "getpwnam" to module mod_auth_file

/                                 
 /home/ftp/users/user         
  /home/ftp/users/user/incoming

dispatching auth request "gid_name" to module mod_radius   
dispatching auth request "gid_name" to module mod_auth_file
dispatching auth request "gid_name" to module mod_auth_unix
dispatching auth request "uid_name" to module mod_radius   
dispatching auth request "uid_name" to module mod_auth_file

Code:
TLSRequired   
<IfClass>   
 IfClassList
/           
 /~         
  /~/incoming

CURRENT-CLASS             
CURRENT-CLIENTS-CLASS-nossl
Ich erkenne, dass der FTP dann, wenn er das Verzeichnis aufzeigen soll Unsinn sendet, aber ich weiß nicht wo der Konfigurationsfehler ist.

Nebenbei wollte ich mich für die Arbeit bedanken, die Du Dir bisher gemacht hast.
Gespeichert
VolGas
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 771



Profil anzeigen
« Antwort #5 am: 26. Dezember 2006, 14:56:29 »

Danke, gern geschehen.

Was Du hier gepostet hast, ist aber ganz normal und nichtssagend - außer daß bei Dir die Direktive
"AuthOrder" fehlt. Bitte Deine proftpd.conf und die komplette Debug-Ausgabe ab dem Einloggen.
Kritische Daten kannst Du heraus-Xen. Und es ist immer noch offen, ob Du eine Firewall oder eine
NAT (Router) zwischen Server und Client hast. Sonst kann ich Dir leider nicht weiterhelfen.

mfg.
  VolGas
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #6 am: 26. Dezember 2006, 16:04:14 »

Ich habe weder eine Firewall noch ein NAT.

Hier erstmal meine proftpd.conf
Code:
ServerName "Debian"
ServerType standalone
DeferWelcome off

TransferLog /var/log/proftpd.xferlog

LogFormat auth "%A %a %c %D %d %h %I %P [%s] %T %t %U %u"
LogFormat default "%h %U %u %t \"%r\" [%s] %b"
LogFormat path "%h %U %u %t \"%r\" [%s]"
LogFormat rw "%h %U %u %t \"%r\" [%s] %b"
#LogFormat all "%A %a %c %D %d %h %I %P %p [%s] \"%r\ %L %m %T %t %U %u"

ExtendedLog /var/log/proftpd_auth.log AUTH auth
ExtendedLog /var/log/proftpd_paths.log DIRS path
ExtendedLog /var/log/proftpd_traffic.log WRITE,READ rw
#ExtendedLog /var/log/proftpd_paranoid.log ALL all

#debugLevel 6
#Serverlog /var/log/proftpd_debug.log

Defaultroot ~ !ftproot

AuthUserFile                    /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group

#DirFakeUser on ~
#DirFakeGroup on users

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
ListOptions                "-l"

AllowOverwrite on
AllowRetrieveRestart on
AllowStoreRestart on

#PassivePorts 49152 65534

#UseReverseDNS off
#IdentLookups off

DenyFilter \*.*/

PersistentPasswd off
#Quotas on
#Ratios on
Port 21
MaxInstances 30
User ftp
Group www-data
Umask 002  002
DelayEngine off

 <Directory />
   <Limit All>
      AllowUser ftpadm
      DenyAll
   </Limit>
   <Limit PASV PWD CWD>
      AllowAll
   </Limit>
 </Directory>

 <Directory ~>
   <Limit All>
      AllowAll
   </Limit>
   <Limit WRITE SITE_CHGRP SITE_CHMOD>
      AllowUser ftpadm
      AllowUser upload1
      AllowUser upload1

#     Hier systemuser eintragen:
      AllowUser solero
      DenyAll
   </Limit>
   <Limit DELE SITE_CHGRP SITE_CHMOD>
      DenyUser AND upload1,upload2
   </Limit>
 </Directory>

 <Directory ~/incoming/>
   <Limit WRITE>
      AllowAll
   </Limit>
 </Directory>

# <Class nossl>
#   From Die.IP.eines.Rechners
# </Class>

# TLS
 <IfModule mod_tls.c>
   TLSEngine on
   TLSLog /var/log/proftpd_tls.log
   TLSOptions NoCertRequest AllowPerUser
   TLSProtocol SSLv23
#   <IfClass !nossl>
#     TLSRequired on
#   </IfClass>
#   <IfClass nossl>
     TLSRequired off
#   </IfClass>
   TLSVerifyClient off
   TLSRSACertificateFile /etc/proftpd/host.cert
   TLSRSACertificateKeyFile /etc/proftpd/host.key
 </IfModule>

 <Anonymous /home/ftp/anonymous/>
   User ftp
   Group www-data
   UserAlias anonymous ftp
   DirFakeUser on ftp
   DirFakeGroup on ftp
   RequireValidShell off
   MaxClients 10
   TransferRate APPE,RETR,STOR,STOU 255
   DisplayLogin welcome.msg
   DisplayFirstChdir .message

   TLSRequired off

   # Limit WRITE everywhere in the anonymous chroot
   <Directory *>
     <Limit WRITE LIST NLST>
       DenyAll
     </Limit>
   </Directory>
   <Directory list>
     <Limit LIST NLIST>
       AllowAll
     </Limit>
   </Directory>
 </Anonymous>

Hier das debugfile, wenn ich mit der obigen Konfiguration eine Verbindung aufgebaut habe:
(Die erste Zeile ist vollständig, vor allen weiteren Zeilen habe ich der Übersicht wegen den, sich immer wiederholenden, Kram entfernt.)
Code:
Dec 26 15:50:53 DNS-des-Servers proftpd[10310] DNS-des-Servers (DNS-des-Clients[IP.des.FTP.Clients]): performing ident lookup
ident connection failed: No route to host
ident lookup returned 'UNKNOWN'
connected - local  : IP.des.FTP.Servers:21
connected - remote : IP.des.FTP.Clients:61250
FTP session opened.
dispatching PRE_CMD command 'USER user1' to mod_rewrite
dispatching PRE_CMD command 'USER user1' to mod_tls
dispatching PRE_CMD command 'USER user1' to mod_core
dispatching PRE_CMD command 'USER user1' to mod_core
dispatching PRE_CMD command 'USER user1' to mod_delay
dispatching PRE_CMD command 'USER user1' to mod_auth
dispatching auth request "endpwent" to module mod_radius
dispatching auth request "endpwent" to module mod_auth_file
dispatching auth request "endpwent" to module mod_auth_unix
dispatching auth request "endgrent" to module mod_radius
dispatching auth request "endgrent" to module mod_auth_file
dispatching auth request "endgrent" to module mod_auth_unix
dispatching CMD command 'USER user1' to mod_ratio
dispatching CMD command 'USER user1' to mod_auth
dispatching auth request "getgroups" to module mod_radius
dispatching auth request "getgroups" to module mod_auth_file
dispatching POST_CMD command 'USER user1' to mod_delay
dispatching LOG_CMD command 'USER user1' to mod_log
dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite
dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
dispatching PRE_CMD command 'PASS (hidden)' to mod_core
dispatching PRE_CMD command 'PASS (hidden)' to mod_core
dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap
dispatching PRE_CMD command 'PASS (hidden)' to mod_radius
dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
dispatching auth request "endpwent" to module mod_radius
dispatching auth request "endpwent" to module mod_auth_file
dispatching auth request "endpwent" to module mod_auth_unix
dispatching auth request "endgrent" to module mod_radius
dispatching auth request "endgrent" to module mod_auth_file
dispatching auth request "endgrent" to module mod_auth_unix
dispatching CMD command 'PASS (hidden)' to mod_auth
dispatching auth request "getgroups" to module mod_radius
dispatching auth request "getgroups" to module mod_auth_file
dispatching auth request "getpwnam" to module mod_radius
dispatching auth request "getpwnam" to module mod_auth_file
dispatching auth request "gid_name" to module mod_radius
dispatching auth request "gid_name" to module mod_auth_file
dispatching auth request "gid_name" to module mod_auth_unix
dispatching auth request "auth" to module mod_radius
dispatching auth request "auth" to module mod_tls
dispatching auth request "auth" to module mod_auth_pam
PAM(user1): User not known to the underlying authentication module.
dispatching auth request "auth" to module mod_auth_file
dispatching auth request "check" to module mod_radius
dispatching auth request "check" to module mod_tls
dispatching auth request "check" to module mod_auth_file
dispatching auth request "setgrent" to module mod_radius
dispatching auth request "setgrent" to module mod_auth_file
dispatching auth request "setgrent" to module mod_auth_unix
dispatching auth request "getpwnam" to module mod_radius
dispatching auth request "getpwnam" to module mod_auth_file
dispatching auth request "getpwnam" to module mod_radius
dispatching auth request "getpwnam" to module mod_auth_file
 
Config for Debian:
/home/ftp/anonymous/
 Limit
  DenyAll
 /list
  Limit
   AllowAll
  DirFakeUser
  DirFakeGroup
  RequireValidShell
  MaxClients
  TransferRate
  DisplayLogin
  DisplayFirstChdir
  TLSRequired
  TransferLog
  ShowSymlinks
  ListOptions
  AllowOverwrite
  AllowRetrieveRestart
  AllowStoreRestart
  DenyFilter
  Umask
  DirUmask
  TransferRate
 UserName
 GroupName
 UserAlias
 DirFakeUser
 DirFakeGroup
 RequireValidShell
 MaxClients
 TransferRate
 DisplayLogin
 DisplayFirstChdir
 TLSRequired
 TransferLog
 ShowSymlinks
 ListOptions
 AllowOverwrite
 AllowRetrieveRestart
 AllowStoreRestart
 DenyFilter
 Umask
 DirUmask
/
 /home/ftp/users/user1
  /home/ftp/users/user1/incoming
   Limit
    AllowAll
   TransferLog
   ShowSymlinks
   DisplayLogin
   DisplayFirstChdir
   ListOptions
   AllowOverwrite
   AllowRetrieveRestart
   AllowStoreRestart
   DenyFilter
   Umask
   DirUmask
   TLSRequired
  Limit
   DenyUser
  Limit
   AllowUser
   AllowUser
   AllowUser
   AllowUser
   DenyAll
  Limit
   AllowAll
  TransferLog
  ShowSymlinks
  DisplayLogin
  DisplayFirstChdir
  ListOptions
  AllowOverwrite
  AllowRetrieveRestart
  AllowStoreRestart
  DenyFilter
  Umask
  DirUmask
  TLSRequired
 Limit
  AllowAll
 Limit
  AllowUser
  DenyAll
 TransferLog
 ShowSymlinks
 DisplayLogin
 DisplayFirstChdir
 ListOptions
 AllowOverwrite
 AllowRetrieveRestart
 AllowStoreRestart
 DenyFilter
 Umask
 DirUmask
 TLSRequired
DeferWelcome
TransferLog
ExtendedLog
ExtendedLog
ExtendedLog
DebugLevel
ServerLog
DefaultRoot
 
 
DefaultServer
ShowSymlinks
TimeoutNoTransfer
TimeoutStalled
TimeoutIdle
DisplayLogin
DisplayFirstChdir
ListOptions
AllowOverwrite
AllowRetrieveRestart
AllowStoreRestart
DenyFilter
UserID
UserName
GroupID
GroupName
Umask
DirUmask
DelayEngine
TLSEngine
TLSLog
TLSOptions
TLSRequired
TLSVerifyClient
TLSRSACertificateFile
TLSRSACertificateKeyFile
CURRENT-CLIENTS
USER
USER user1: Login successful.
opening TransferLog '/var/log/proftpd.xferlog'
dispatching auth request "getpwnam" to module mod_radius
dispatching auth request "getpwnam" to module mod_auth_file
dispatching auth request "setpwent" to module mod_radius
dispatching auth request "setpwent" to module mod_auth_file
dispatching auth request "setpwent" to module mod_auth_unix
dispatching auth request "setgrent" to module mod_radius
dispatching auth request "setgrent" to module mod_auth_file
dispatching auth request "setgrent" to module mod_auth_unix
dispatching auth request "getpwent" to module mod_radius
dispatching auth request "getpwent" to module mod_auth_file
dispatching auth request "getgrent" to module mod_radius
dispatching auth request "getgrent" to module mod_auth_file
Preparing to chroot() the environment, path = '/home/ftp/users/user1'
Environment successfully chroot()ed.
in dir_check_full(): path = '/', fullpath = '/home/ftp/users/user1/'.
dispatching POST_CMD command 'PASS (hidden)' to mod_cap
mod_cap/1.0: capabilities '= cap_net_bind_service+ep'
dispatching POST_CMD command 'PASS (hidden)' to mod_ifsession
dispatching POST_CMD command 'PASS (hidden)' to mod_readme
dispatching POST_CMD command 'PASS (hidden)' to mod_delay
dispatching POST_CMD command 'PASS (hidden)' to mod_radius
dispatching POST_CMD command 'PASS (hidden)' to mod_tls
dispatching POST_CMD command 'PASS (hidden)' to mod_ratio
dispatching POST_CMD command 'PASS (hidden)' to mod_quotatab
dispatching POST_CMD command 'PASS (hidden)' to mod_log
dispatching POST_CMD command 'PASS (hidden)' to mod_ls
dispatching POST_CMD command 'PASS (hidden)' to mod_auth
dispatching LOG_CMD command 'PASS (hidden)' to mod_log
dispatching LOG_CMD command 'PASS (hidden)' to mod_ratio
dispatching PRE_CMD command 'PWD' to mod_rewrite
dispatching PRE_CMD command 'PWD' to mod_tls
dispatching PRE_CMD command 'PWD' to mod_core
dispatching PRE_CMD command 'PWD' to mod_core
dispatching CMD command 'PWD' to mod_core
dispatching LOG_CMD command 'PWD' to mod_log
dispatching PRE_CMD command 'FEAT' to mod_rewrite
dispatching PRE_CMD command 'FEAT' to mod_tls
dispatching PRE_CMD command 'FEAT' to mod_core
dispatching PRE_CMD command 'FEAT' to mod_core
dispatching CMD command 'FEAT' to mod_core
dispatching LOG_CMD command 'FEAT' to mod_log
dispatching PRE_CMD command 'REST 100' to mod_rewrite
dispatching PRE_CMD command 'REST 100' to mod_tls
dispatching PRE_CMD command 'REST 100' to mod_core
dispatching PRE_CMD command 'REST 100' to mod_core
dispatching CMD command 'REST 100' to mod_xfer
dispatching LOG_CMD command 'REST 100' to mod_log
dispatching PRE_CMD command 'TYPE A' to mod_rewrite
dispatching PRE_CMD command 'TYPE A' to mod_tls
dispatching PRE_CMD command 'TYPE A' to mod_core
dispatching PRE_CMD command 'TYPE A' to mod_core
dispatching CMD command 'TYPE A' to mod_xfer
dispatching LOG_CMD command 'TYPE A' to mod_log
dispatching PRE_CMD command 'REST 0' to mod_rewrite
dispatching PRE_CMD command 'REST 0' to mod_tls
dispatching PRE_CMD command 'REST 0' to mod_core
dispatching PRE_CMD command 'REST 0' to mod_core
dispatching CMD command 'REST 0' to mod_xfer
dispatching LOG_CMD command 'REST 0' to mod_log
dispatching PRE_CMD command 'PASV' to mod_rewrite
dispatching PRE_CMD command 'PASV' to mod_tls
dispatching PRE_CMD command 'PASV' to mod_core
dispatching PRE_CMD command 'PASV' to mod_core
dispatching CMD command 'PASV' to mod_core
Entering Passive Mode (IP,des,FTP,Servers,226,207).
dispatching LOG_CMD command 'PASV' to mod_log
dispatching PRE_CMD command 'LIST' to mod_rewrite
dispatching PRE_CMD command 'LIST' to mod_tls
dispatching PRE_CMD command 'LIST' to mod_core
dispatching PRE_CMD command 'LIST' to mod_core
dispatching PRE_CMD command 'LIST' to mod_ratio
dispatching CMD command 'LIST' to mod_ls
passive data connection opened - local  : IP.des.FTP.Servers:58063
passive data connection opened - remote : IP.des.FTP.Clients:61253
dispatching auth request "gid_name" to module mod_radius
dispatching auth request "gid_name" to module mod_auth_file
dispatching auth request "gid_name" to module mod_auth_unix
dispatching auth request "uid_name" to module mod_radius
dispatching auth request "uid_name" to module mod_auth_file
dispatching POST_CMD command 'LIST' to mod_ratio
dispatching LOG_CMD command 'LIST' to mod_log
dispatching LOG_CMD command 'LIST' to mod_ls
mod_tls/2.0.7: scrubbing all passphrases from memory
dispatching auth request "endpwent" to module mod_radius
dispatching auth request "endpwent" to module mod_auth_file
dispatching auth request "endpwent" to module mod_auth_unix
dispatching auth request "endgrent" to module mod_radius
dispatching auth request "endgrent" to module mod_auth_file
dispatching auth request "endgrent" to module mod_auth_unix
FTP session closed.
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #7 am: 26. Dezember 2006, 16:05:54 »

Nun habe ich in proftpd.conf bei den Zeilen das '#' entfernt, die den Zugang für eine bestimmte IP ohne SSL erlauben sollen.
Code:
performing ident lookup
ident connection failed: No route to host
ident lookup returned 'UNKNOWN'
connected - local  : IP.des.FTP.Servers:21
connected - remote : IP.des.FTP.Clients:61257
FTP session opened.
dispatching PRE_CMD command 'USER user1' to mod_rewrite
dispatching PRE_CMD command 'USER user1' to mod_tls
dispatching PRE_CMD command 'USER user1' to mod_core
dispatching PRE_CMD command 'USER user1' to mod_core
dispatching PRE_CMD command 'USER user1' to mod_delay
dispatching PRE_CMD command 'USER user1' to mod_auth
dispatching auth request "endpwent" to module mod_radius
dispatching auth request "endpwent" to module mod_auth_file
dispatching auth request "endpwent" to module mod_auth_unix
dispatching auth request "endgrent" to module mod_radius
dispatching auth request "endgrent" to module mod_auth_file
dispatching auth request "endgrent" to module mod_auth_unix
dispatching CMD command 'USER user1' to mod_ratio
dispatching CMD command 'USER user1' to mod_auth
dispatching auth request "getgroups" to module mod_radius
dispatching auth request "getgroups" to module mod_auth_file
dispatching POST_CMD command 'USER user1' to mod_delay
dispatching LOG_CMD command 'USER user1' to mod_log
dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite
dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
dispatching PRE_CMD command 'PASS (hidden)' to mod_core
dispatching PRE_CMD command 'PASS (hidden)' to mod_core
dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap
dispatching PRE_CMD command 'PASS (hidden)' to mod_radius
dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
dispatching auth request "endpwent" to module mod_radius
dispatching auth request "endpwent" to module mod_auth_file
dispatching auth request "endpwent" to module mod_auth_unix
dispatching auth request "endgrent" to module mod_radius
dispatching auth request "endgrent" to module mod_auth_file
dispatching auth request "endgrent" to module mod_auth_unix
dispatching CMD command 'PASS (hidden)' to mod_auth
dispatching auth request "getgroups" to module mod_radius
dispatching auth request "getgroups" to module mod_auth_file
dispatching auth request "getpwnam" to module mod_radius
dispatching auth request "getpwnam" to module mod_auth_file
dispatching auth request "gid_name" to module mod_radius
dispatching auth request "gid_name" to module mod_auth_file
dispatching auth request "gid_name" to module mod_auth_unix
dispatching auth request "auth" to module mod_radius
dispatching auth request "auth" to module mod_tls
dispatching auth request "auth" to module mod_auth_pam
PAM(user1): User not known to the underlying authentication module.
dispatching auth request "auth" to module mod_auth_file
dispatching auth request "check" to module mod_radius
dispatching auth request "check" to module mod_tls
dispatching auth request "check" to module mod_auth_file
dispatching auth request "setgrent" to module mod_radius
dispatching auth request "setgrent" to module mod_auth_file
dispatching auth request "setgrent" to module mod_auth_unix
 
Config for Debian:
/home/ftp/anonymous/
 Limit
  DenyAll
 /list
  Limit
   AllowAll
  DirFakeUser
  DirFakeGroup
  RequireValidShell
  MaxClients
  TransferRate
  DisplayLogin
  DisplayFirstChdir
  TransferLog
  ShowSymlinks
  ListOptions
  AllowOverwrite
  AllowRetrieveRestart
  AllowStoreRestart
  DenyFilter
  Umask
  DirUmask
  TransferRate
  TLSRequired
  TransferRate
 UserName
 GroupName
 UserAlias
 DirFakeUser
 DirFakeGroup
 RequireValidShell
 MaxClients
 TransferRate
 DisplayLogin
 DisplayFirstChdir
 TransferLog
 ShowSymlinks
 ListOptions
 AllowOverwrite
 AllowRetrieveRestart
 AllowStoreRestart
 DenyFilter
 Umask
 DirUmask
 TLSRequired
<IfClass>
 IfClassList
/
 /~
  /~/incoming
   Limit
    AllowAll
   TransferLog
   ShowSymlinks
   DisplayLogin
   DisplayFirstChdir
   ListOptions
   AllowOverwrite
   AllowRetrieveRestart
   AllowStoreRestart
   DenyFilter
   Umask
   DirUmask
   TLSRequired
  Limit
   DenyUser
  Limit
   AllowUser
   AllowUser
   AllowUser
   AllowUser
   DenyAll
  Limit
   AllowAll
  TransferLog
  ShowSymlinks
  DisplayLogin
  DisplayFirstChdir
  ListOptions
  AllowOverwrite
  AllowRetrieveRestart
  AllowStoreRestart
  DenyFilter
  Umask
  DirUmask
  TLSRequired
 Limit
  AllowAll
 Limit
  AllowUser
  DenyAll
 TransferLog
 ShowSymlinks
 DisplayLogin
 DisplayFirstChdir
 ListOptions
 AllowOverwrite
 AllowRetrieveRestart
 AllowStoreRestart
 DenyFilter
 Umask
 DirUmask
 TLSRequired
DeferWelcome
TransferLog
ExtendedLog
ExtendedLog
ExtendedLog
DebugLevel
ServerLog
DefaultRoot
 
 
DefaultServer
ShowSymlinks
TimeoutNoTransfer
TimeoutStalled
TimeoutIdle
DisplayLogin
DisplayFirstChdir
ListOptions
AllowOverwrite
AllowRetrieveRestart
AllowStoreRestart
DenyFilter
UserID
UserName
GroupID
GroupName
Umask
DirUmask
DelayEngine
TLSEngine
TLSLog
TLSOptions
TLSVerifyClient
TLSRSACertificateFile
TLSRSACertificateKeyFile
TLSRequired
CURRENT-CLIENTS
CURRENT-CLASS
CURRENT-CLIENTS-CLASS-nossl
USER
USER user1: Login successful.
opening TransferLog '/var/log/proftpd.xferlog'
dispatching auth request "getpwnam" to module mod_radius
dispatching auth request "getpwnam" to module mod_auth_file
dispatching auth request "setpwent" to module mod_radius
dispatching auth request "setpwent" to module mod_auth_file
dispatching auth request "setpwent" to module mod_auth_unix
dispatching auth request "setgrent" to module mod_radius
dispatching auth request "setgrent" to module mod_auth_file
dispatching auth request "setgrent" to module mod_auth_unix
dispatching auth request "getpwent" to module mod_radius
dispatching auth request "getpwent" to module mod_auth_file
dispatching auth request "getgrent" to module mod_radius
dispatching auth request "getgrent" to module mod_auth_file
Preparing to chroot() the environment, path = '/home/ftp/users/user1'
Environment successfully chroot()ed.
in dir_check_full(): path = '/', fullpath = '/home/ftp/users/user1/'.
dispatching POST_CMD command 'PASS (hidden)' to mod_cap
mod_cap/1.0: capabilities '= cap_net_bind_service+ep'
dispatching POST_CMD command 'PASS (hidden)' to mod_ifsession
dispatching POST_CMD command 'PASS (hidden)' to mod_readme
dispatching POST_CMD command 'PASS (hidden)' to mod_delay
dispatching POST_CMD command 'PASS (hidden)' to mod_radius
dispatching POST_CMD command 'PASS (hidden)' to mod_tls
dispatching POST_CMD command 'PASS (hidden)' to mod_ratio
dispatching POST_CMD command 'PASS (hidden)' to mod_quotatab
dispatching POST_CMD command 'PASS (hidden)' to mod_log
dispatching POST_CMD command 'PASS (hidden)' to mod_ls
dispatching POST_CMD command 'PASS (hidden)' to mod_auth
dispatching LOG_CMD command 'PASS (hidden)' to mod_log
dispatching LOG_CMD command 'PASS (hidden)' to mod_ratio
dispatching PRE_CMD command 'PWD' to mod_rewrite
dispatching PRE_CMD command 'PWD' to mod_tls
dispatching PRE_CMD command 'PWD' to mod_core
dispatching PRE_CMD command 'PWD' to mod_core
dispatching CMD command 'PWD' to mod_core
dispatching LOG_CMD command 'PWD' to mod_log
dispatching PRE_CMD command 'FEAT' to mod_rewrite
dispatching PRE_CMD command 'FEAT' to mod_tls
dispatching PRE_CMD command 'FEAT' to mod_core
dispatching PRE_CMD command 'FEAT' to mod_core
dispatching CMD command 'FEAT' to mod_core
dispatching LOG_CMD command 'FEAT' to mod_log
dispatching PRE_CMD command 'REST 100' to mod_rewrite
dispatching PRE_CMD command 'REST 100' to mod_tls
dispatching PRE_CMD command 'REST 100' to mod_core
dispatching PRE_CMD command 'REST 100' to mod_core
dispatching CMD command 'REST 100' to mod_xfer
dispatching LOG_CMD command 'REST 100' to mod_log
dispatching PRE_CMD command 'TYPE A' to mod_rewrite
dispatching PRE_CMD command 'TYPE A' to mod_tls
dispatching PRE_CMD command 'TYPE A' to mod_core
dispatching PRE_CMD command 'TYPE A' to mod_core
dispatching CMD command 'TYPE A' to mod_xfer
dispatching LOG_CMD command 'TYPE A' to mod_log
dispatching PRE_CMD command 'REST 0' to mod_rewrite
dispatching PRE_CMD command 'REST 0' to mod_tls
dispatching PRE_CMD command 'REST 0' to mod_core
dispatching PRE_CMD command 'REST 0' to mod_core
dispatching CMD command 'REST 0' to mod_xfer
dispatching LOG_CMD command 'REST 0' to mod_log
dispatching PRE_CMD command 'PASV' to mod_rewrite
dispatching PRE_CMD command 'PASV' to mod_tls
dispatching PRE_CMD command 'PASV' to mod_core
dispatching PRE_CMD command 'PASV' to mod_core
dispatching CMD command 'PASV' to mod_core
Entering Passive Mode (IP,des,FTP,Servers,225,66).
dispatching LOG_CMD command 'PASV' to mod_log
dispatching PRE_CMD command 'LIST' to mod_rewrite
dispatching PRE_CMD command 'LIST' to mod_tls
dispatching PRE_CMD command 'LIST' to mod_core
dispatching PRE_CMD command 'LIST' to mod_core
dispatching PRE_CMD command 'LIST' to mod_ratio
dispatching CMD command 'LIST' to mod_ls
passive data connection opened - local  : IP.des.FTP.Servers:57666
passive data connection opened - remote : IP.des.FTP.Clients:61258
dispatching POST_CMD command 'LIST' to mod_ratio
dispatching LOG_CMD command 'LIST' to mod_log
dispatching LOG_CMD command 'LIST' to mod_ls
mod_tls/2.0.7: scrubbing all passphrases from memory
dispatching auth request "endpwent" to module mod_radius
dispatching auth request "endpwent" to module mod_auth_file
dispatching auth request "endpwent" to module mod_auth_unix
dispatching auth request "endgrent" to module mod_radius
dispatching auth request "endgrent" to module mod_auth_file
dispatching auth request "endgrent" to module mod_auth_unix
FTP session closed.
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #8 am: 26. Dezember 2006, 16:10:58 »

Ich habe zur Sicherheit, ob es nicht doch vielleicht an meinem Client-Rechner liegt den Client direkt auf dem Server laufen lassen.

Somit liefen ProFTPd und der FTPClient auf der selben Maschine, das Ergebnis war das Gleiche. Ein Firewall bzw. NAT bedingter Fehler ist deshalb glaube ich auszuschließen.
Gespeichert
VolGas
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 771



Profil anzeigen
« Antwort #9 am: 27. Dezember 2006, 09:52:51 »

Hi,

zurück in "alter" (bäh!) Frische...  Zwinkernd

Nun ja, zuerst muß ich schreiben, daß ich mich oben vertan habe: Dein Problem liegt wohl nicht an TLS,
sonst könntest Du ohne ganz normal arbeiten. Es ist jedoch immer empfehlenswert, zuerst den Normal-
betrieb ohne TLS zu testen. Wenn der gewährleistet ist, kann man dann immer noch die TLS zuschalten.

Leider gibt das Debug-Log auch nichts her - außer, daß der ProFTPD einen ganzen Haufen "unnötiger"
Module mit sich herumschleppt und bedient. Am Ende des Logs sieht man nur die Aufräumarbeiten vor
dem Beenden des aktuellen Prozesses. Es scheint also alles ganz normal...

Deine proftpd.conf sieht eigentlich auch ganz gut aus, ich würde nur noch "RequireValidShell off" und
für Deinem Fall "AuthOrder mod_auth_file.c" hinzunehmen, damit sich das ganze Login- und UID/GID-
Prozedere alleine auf dieses Modul bezieht. Und, obwohl man im Logfile keinen Hinweis darauf findet,
deaktiviere einmal alle "<Limit>"-Blöcke und starte dann damit mal den Server.

Sonst habe ich eigentlich mit Debug-Level 5 immer gute Erfahrungen gemacht und die Fehler finden
können. Ich kann es mir zwar kaum vorstellen, daß das was ändert, aber versuche einmal den
"interaktiven Debugmodus" und starte den ProFTPD "von Hand" mit den Parametern "-nd5" und versuche
es dann noch einmal von einer anderen Maschine. Vielleicht finden wir ja doch noch einen Hinweis...

mfg.
  VolGas
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #10 am: 27. Dezember 2006, 16:05:06 »

Hi,

ich habe alle LIMIT Blöcke entfernt und es lief.
Vielen Dank für den Hinweis.

Es stellte sich heraus, dass der FTP bereits in / das 'LIST' Kommando braucht. Warum das nur in Kombination mit der IP basierten Regel auftritt ist mir aber immernoch unbekannt.
Jetzt muss ich wohl mal darüber nachdenken wie paranoid ich bin.
In der bisherigen Konfiguration waren alle User, sofern sie nicht in der Gruppe 'ftproot' waren in ihrem Homeverzeichnis gechrootet. Wenn ich aber jemandem etwas außerhalb des chroots geben wollte, so konnte ich den User in die Gruppe 'ftproot' packen und einen softlink in seinem Homeverzeichnis erstellen. Der User konnte dann nur dem Softlink folgen und sah sonst nichts aus anderen Verzeichnissen, da das 'LIST' Kommando deaktiviert war. ('mount --bind' funktioniert auf dem vserver nicht.)
Nun geht es aber nur, wenn 'LIST' ab / erlaubt ist, somit kann jeder der in der Gruppe 'ftproot' ist alles sehen. Ich weiß, dass das bei einem Shelluser sowieso so ist, aber beim FTP wollte ich das vermeiden.

Hast Du da vielleicht eine Idee?
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #11 am: 27. Dezember 2006, 20:20:27 »

Hi,

ich habe eben noch etwas herausgefunden, von dem ich noch nicht weiß, ob es relevant ist.
Der von mir beschriebene Fehler, dass das 'LIST' Kommando nötig ist tritt nur auf, wenn die IP des Cients in der 'nossl' Gruppe ist. Verbindet sich also ein User zum FTP dessen IP nicht in der 'nossl' Gruppe ist, so wird er abgewiesen falls SSL deaktiviert ist, ansonsten sieht er aber sein Homeverzeichnis auch ohne, dass das 'LIST' Kommando bereits ab / erlaubt ist.

PS. Was muss ich machen um Posts editieren zu können? Ich sehe keinen Button, der mir dies anbietet.

mfg Solero
Gespeichert
VolGas
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 771



Profil anzeigen
« Antwort #12 am: 28. Dezember 2006, 09:59:23 »

Den Fehler im "<Limit>"-Block hatte ich jetzt gar nicht gesehen - das ist auch die Crux an der ganzen Sache:
man verliert bei Limitierungen sehr schnell den Überblick, da die Dinge, die "übrig" bleiben, im Kopf behalten
muß, weil sie einfach nicht da stehen. Deshalb sollte man -wie hast Du es so schön bezeichnet- seine Paranoia
zügeln und sich und dem System einfach mehr vertrauen und Limits nur dann setzen, wenn sie wirklich absolut
unumgänglich sind. Aber: trotz alle dem hätte im Debug-Log ein entsprechender Hinweis sein müssen!

Nächster Punkt: einem FTP-User Zugriff auf das Root-Verzeichnis zu geben finde ich eine absolut gefährliche
und damit -Entschuldigung- blöde Idee! Packe lieber alles in ein Verzeichnis rein, versuche eine Struktur auf-
zubauen, die ein Zugang auf "/" nicht notwendig macht. Hier muß die Sicherheit des Servers (weit!) über der
Bequemlichkeit der User stehen. Es ist ganz normal und durchaus vertretbar, daß FTP-Administratoren mehrere
unterschiedliche FTP-Accounts "bedienen" müssen. Per FTP gar einen ganzen Server administrieren zu wollen
ist meiner Meinung nach wahnwitzig, einfach unsinnig.

Zu Deinem letzten Posting: das kann ich mir jetzt auch nicht erklären, dafür gibt es bestimmt eine logische
Erklärung. Aber ich möchte jetzt nicht doch noch Deine Konfiguration im einzelnen analysieren müssen.

Über Board-Funktionen kann ich Dir keine Auskunft geben.
Ich habe hier im Forum zwar ein paar zusätzliche Nutzerrechte, da ich aktiv Fragen anderer beantworte,
aber bin weder Moderator noch Administrator. Da mußt Du Dich an Stonki wenden.

mfg.
  VolGas
Gespeichert
Solero
ProFTPD
*
Offline Offline

Beiträge: 9


Profil anzeigen
« Antwort #13 am: 28. Dezember 2006, 10:11:09 »

Danke für die sehr ausführliche und schnelle Hilfe.
Ich werde mich noch weiter in die Bedienung einlesen und nach einem anderen Weg suchen um Daten außerhalb des Homeverzeichnisses freizugeben ohne den chroot aufzuheben.

Noch schöne Festtage und einen guten Rutsch.

mfg Solero
Gespeichert
Seiten: [1]   Nach oben
  Drucken  
 
Gehe zu:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS
Seite erstellt in 0.084 Sekunden mit 16 Zugriffen.