pureftpd+tls

Rund um die Sicherheit des Systems und die Applikationen
Post Reply
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

pureftpd+tls

Post by deejay »

hallo leute,

ich habe soeben pureftp mit tls compilliert und per xinetd gestartet (parameter --tls=1)
leider funktioniert es nicht, es kommt immer der fehler
[R] AUTH TLS
[R] 500 Sicherheitserweiterung nicht implementiert.
[R] Failed SSL/TLS negotiation, disconnected
[R] Connection failed (Connection lost)
[R] Delaying for 120 seconds before reconnect attempt #1
das zertifikat ist unter /etc/ssl/private/pure-ftpd.pem
habe mich schlicht an das howto http://www.pureftpd.org/README.TLS gehalten

einer eine idee?
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

benutzt du auch einen FTP-Client, der TLS-Verbindungen aufbauen kann?

:roll:
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

jo, flashfxp
es funzt auf anderen ftps auch die tls aktiviert haben...aber die ham alle glftpd
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

poste mal bitte deinen Configure-String und evtl. noch einen Log-Auszug.

:roll:
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

./configure --with-tls --with-certfile /etc/ssl/private/pure-ftpd.pem --with-language=german --with-paranoidmsg --with-puredb --with-qoutas --with-ratios --with-throttling --with-virtualchroot --with-virtualhosts --with-welcomemsg
dies steht in der xinetd:
service ftp
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/local/sbin/pure-ftpd
server_args = -A -E -I 5 -k 95% -s -w
log_on_success += DURATION USERID
log_on_failure += USERID
# nice = 10
disable = no
}
und das flashfxplog:

WinSock 2.0 -- OpenSSL 0.9.7d 17 Mar 2004
[R] Connecting to xxx -> IP=xxx PORT=21
[R] Connected to xxx
[R] 220---------- Herzlich willkommen auf Pure-FTPd [TLS] ----------
[R] 220-Sie sind Benutzer 1 von 50 erlaubten.
[R] 220-Lokale Zeit: 22:33. Serverport: 21.
[R] 220-Dies ist ein privates System - Keine anonyme Anmeldung möglich.
[R] 220-Auf diesem Server sind auch IPv6-Verbindungen willkommen
[R] 220 Sie werden nach 5 Minuten Inaktivität getrennt.
[R] AUTH TLS
[R] 500 Sicherheitserweiterung nicht implementiert.
[R] Failed SSL/TLS negotiation, disconnected
[R] Connection failed (Connection lost)
[R] Delaying for 120 seconds before reconnect attempt #1
[/code]
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

wo in der xinetd startest du bitte deinen Server mit --tls=1 bzw. -Y ?
Once the certificate has been installed, you need to start a TLS-enabled
pure-ftpd daemon with the -Y (or --tls=) switch. Example :

/usr/local/sbin/pure-ftpd --tls=1 &

- With "--tls=0", support for SSL/TLS is disabled. This is the default.
- With "--tls=1", clients can connect either the traditional way or through an
SSL/TLS layer.
- With "--tls=2", cleartext sessions are refused and only SSL/TLS compatible
clients are accepted.

When SSL/TLS has been successfully negociated for a connection, you'll see
something similar to this in log files :

<<
SSL/TLS: Enabled TLSv1/SSLv3 with DES-CBC3-SHA, 168 secret bits cipher
>>
:roll:
Last edited by superuser1 on 2004-09-18 22:48, edited 2 times in total.
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

das problem ist wenn ich ihn mit "/usr/local/sbin/pure-ftpd --tls=1 &"
starte, kommt folgender fehler:
WinSock 2.0 -- OpenSSL 0.9.7d 17 Mar 2004
[R] Connecting to xxx-> IP=xxx PORT=21
[R] Connected to xxx
[R] Connection failed (Connection lost)
[R] Delaying for 120 seconds before reconnect attempt #1
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

dann füge mal bei

Code: Select all

server_args = -Y
hinzu.

Und starte es über

Code: Select all

/etc/init.d/xinetd restart
und nicht über die Kommandozeile.

Und beende evtl. noch laufende pure-ftpd Prozesse vorher.

:roll:
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/local/sbin/pure-ftpd
server_args = -Y -A -E -I 5 -k 95% -s -w
log_on_success += DURATION USERID
log_on_failure += USERID
# nice = 10
disable = no
}

fazit:
WinSock 2.0 -- OpenSSL 0.9.7d 17 Mar 2004
[R] 220---------- Herzlich willkommen auf Pure-FTPd [TLS] ----------
[R] 220-Sie sind Benutzer 1 von 50 erlaubten.
[R] 220-Lokale Zeit: 22:48. Serverport: 21.
[R] 220-Dies ist ein privates System - Keine anonyme Anmeldung möglich.
[R] 220-Auf diesem Server sind auch IPv6-Verbindungen willkommen
[R] 220 Sie werden nach 5 Minuten Inaktivität getrennt.
[R] AUTH TLS
[R] 500 Sicherheitserweiterung nicht implementiert.
[R] Failed SSL/TLS negotiation, disconnected
[R] Connection failed (Connection lost)
[R] Delaying for 120 seconds before reconnect attempt #1
[R] Retry attempt Aborted
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

Code: Select all

server_args -Y 1
?!

:roll:
Last edited by superuser1 on 2004-09-18 23:06, edited 1 time in total.
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

jetzt kann ich garnichtmehr connecten, weder mit noch ohne :(((
das zertifikat ist auch ok...
komisch nicht?
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

poste mal bitte

Code: Select all

ps aux
:roll:
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 620 72 ? S Aug19 0:06 init [3]
root 2 0.0 0.0 0 0 ? SW Aug19 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SWN Aug19 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? SW Aug19 1:13 [kswapd]
root 5 0.0 0.0 0 0 ? SW Aug19 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? SW Aug19 0:00 [kupdated]
root 10 0.0 0.0 0 0 ? SW Aug19 0:00 [khubd]
root 11 0.0 0.0 0 0 ? SW Aug19 0:49 [kjournald]
root 97 0.0 0.0 0 0 ? SW Aug19 0:00 [kjournald]
root 731 0.0 0.1 1652 624 ? S Aug19 0:29 /sbin/syslogd -a /var/lib/named/dev/log
root 734 0.0 0.1 2488 636 ? S Aug19 0:24 /sbin/klogd -c 1 -2
root 809 0.0 0.0 1524 400 ? S Aug19 0:00 /sbin/resmgrd
bin 827 0.0 0.0 1516 300 ? S Aug19 0:00 /sbin/portmap
root 888 0.0 0.0 1352 228 ? S Aug19 0:00 /sbin/startpar -f -- /etc/init.d/rc3.d/S13named
root 889 0.0 0.2 4456 1148 ? S Aug19 0:00 /usr/sbin/saslauthd -a pam
root 893 0.0 0.2 4456 1148 ? S Aug19 0:00 /usr/sbin/saslauthd -a pam
root 894 0.0 0.2 4456 1148 ? S Aug19 0:00 /usr/sbin/saslauthd -a pam
root 895 0.0 0.2 4456 1148 ? S Aug19 0:00 /usr/sbin/saslauthd -a pam
root 896 0.0 0.2 4456 1148 ? S Aug19 0:00 /usr/sbin/saslauthd -a pam
named 901 0.0 0.2 11112 1088 ? S Aug19 0:00 /usr/sbin/named -t /var/lib/named -u named
named 902 0.0 0.2 11112 1088 ? S Aug19 0:00 /usr/sbin/named -t /var/lib/named -u named
named 903 0.0 0.2 11112 1088 ? S Aug19 0:00 /usr/sbin/named -t /var/lib/named -u named
named 904 0.0 0.2 11112 1088 ? S Aug19 0:00 /usr/sbin/named -t /var/lib/named -u named
named 905 0.0 0.2 11112 1088 ? S Aug19 0:00 /usr/sbin/named -t /var/lib/named -u named
root 1028 0.0 0.1 4912 736 ? S Aug19 0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root 2074 0.0 0.1 12272 776 ? S Aug19 0:05 /usr/sbin/nscd
root 2076 0.0 0.1 12272 776 ? S Aug19 0:00 /usr/sbin/nscd
root 2077 0.0 0.1 12272 776 ? S Aug19 0:06 /usr/sbin/nscd
root 2078 0.0 0.1 12272 776 ? S Aug19 0:00 /usr/sbin/nscd
root 2079 0.0 0.1 1516 528 ? S Aug19 0:00 /usr/sbin/cron
root 2083 0.0 0.1 12272 776 ? S Aug19 0:00 /usr/sbin/nscd
root 2084 0.0 0.1 12272 776 ? S Aug19 0:00 /usr/sbin/nscd
root 2085 0.0 0.1 12272 776 ? S Aug19 0:00 /usr/sbin/nscd
root 2087 0.0 0.0 1500 428 tty1 S Aug19 0:00 /sbin/mingetty --noclear tty1
root 2088 0.0 0.0 1500 428 tty2 S Aug19 0:00 /sbin/mingetty tty2
root 2089 0.0 0.0 1500 428 tty3 S Aug19 0:00 /sbin/mingetty tty3
root 2090 0.0 0.0 1500 428 tty4 S Aug19 0:00 /sbin/mingetty tty4
root 2091 0.0 0.0 1500 428 tty5 S Aug19 0:00 /sbin/mingetty tty5
root 2092 0.0 0.0 1500 428 tty6 S Aug19 0:00 /sbin/mingetty tty6
root 2093 0.0 0.0 1492 428 ttyS0 S Aug19 0:00 /sbin/agetty -L 57600 ttyS0 vt102
root 2148 0.0 0.2 4616 1088 ? S Aug19 0:10 /usr/sbin/snmpd -c /etc/snmpd.conf -r -A -l /var/log/ucd-snmpd.log -P /var/run/snmpd.pid
root 2180 0.0 0.0 1548 480 ? S Aug19 0:00 ./oidentd
root 2370 0.1 1.8 11864 9608 ? S Aug19 79:55 ./psybnc
web9 7319 0.0 0.2 3512 1124 ? S Aug19 0:32 ./psybnc
root 17841 0.0 0.2 3312 1096 ? S Aug22 0:00 /usr/bin/perl /root/confixx/pipelog.pl
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

was sagt ein

Code: Select all

/etc/init.d/xinetd start
:roll:
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

/etc/init.d/xinetd start
Starting INET services. (xinetd) done
es geht der popper auch..aber halt nur net der pureftpd
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: pureftpd+tls

Post by superuser1 »

Hi...

ich habe den PureFTPD jetzt mal basierend auf deinen Angaben testweise installiert:

Code: Select all

1) mkdir /etc/ssl/private
2) openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
3) chmod 600 /etc/ssl/private/*.pem
4) tar -xzf pure-ftpd-1.0.20.tar.gz
5) cd pure-ftpd-1.0.20
6) ./configure --with-tls --with-certfile=/etc/ssl/private/pure-ftpd.pem --with-language=german --with-paranoidmsg --with-puredb --with-qoutas --with-ratios --with-throttling --with-virtualchroot --with-virtualhosts --with-welcomemsg
7) make install-strip
8) Eintrag in /etc/xinetd.conf  
service ftp
{
    socket_type = stream
    server = /usr/local/sbin/pure-ftpd
    server_args = -Y 1 -A -E -I 5 -k 95% -s -w
    protocol = tcp
    user = root
    wait = no
    disable = no
}
9) /etc/init.d/xinetd stop
10) /etc/init.d/xinetd start
Funktioniert ohne Probleme. Schau mal ob du es so nachvollziehen kannst.

:roll:
deejay
Posts: 21
Joined: 2004-07-22 13:09
 

Re: pureftpd+tls

Post by deejay »

funzt !!!
danke vielmals...keine ahnung was ich falsch gemacht habe...
Post Reply