| 
 | |||||||
| 
 | 
|  | 
|  | 
|  | Strumenti | 
|  27-01-2007, 16:07 | #1 | 
| Senior Member Iscritto dal: Dec 2004 Città: Roma 
					Messaggi: 571
				 | 
				
				VSFTPD e supporto SSL...non so che fare!!!!!
			 
		Ciao a tutti...ho provato ad attivare il supporto SSl inserendo queste opzioni: # This option specifies the location of the RSA certificate to use for SSL # encrypted connections. rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem # # This option specifies the location of the RSA key to use for SSL # encrypted connections. rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key # # If enabled, and vsftpd was compiled against OpenSSL, vsftpd will # support secure connections via SSL. This applies to the contro # connection (including login) and also data connections. You’ll # need a client with SSL support too. NOTE!! Beware enabling this # option. Only enable it if you need it. vsftpd can make no guar‐ # antees about the security of the OpenSSL libraries. By enabling # this option, you are declaring that you trust the security of # your installed OpenSSL library. ssl_enable=YES # # Only applies if ssl_enable is activated. If enabled, this option # will permit SSL v2 protocol connections. TLS v1 connections are # preferred. ssl_sslv2=YES # # Only applies if ssl_enable is activated. If enabled, this option # will permit SSL v3 protocol connections. TLS v1 connections are # preferred. ssl_sslv3=YES # # Only applies if ssl_enable is activated. If enabled, this option # will permit TLS v1 protocol connections. TLS v1 connections are # preferred. ssl_tlsv1=YES # # Only applies if ssl_enable is activated. If activated, all # anonymous logins are forced to use a secure SSL connection in # order to send and receive data on data connections. force_anon_data_ssl=YES # # Only applies if ssl_enable is activated. If activated, all # anonymous logins are forced to use a secure SSL connection in # order to send the password. force_anon_logins_ssl=YES # # Only applies if ssl_enable is activated. If activated, all non- # anonymous logins are forced to use a secure SSL connection in # order to send and receive data on data connections. force_local_data_ssl=YES # # Only applies if ssl_enable is activated. If activated, all non- # anonymous logins are forced to use a secure SSL connection in # order to send the password. force_local_logins_ssl=YES Dopodichè ho creato (almeno credo) un certificato SSL e una chiave, dando il seguente comando: sudo openssl req -x509 -nodes -days 7300 -newkey rsa:2048 \-keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem Ho fermato il server, l'ho riavviato, ho caricato le nuove impostazioni e ho provato a connettermi da locale (ftp localhost) , ricevendo, al momento di inserire il nome, questo errore: 530 Non-anonymous sessions must use encryption. Login failed. . . . . . . . . AIUTOOO!!!!! Angry | 
|   |   | 
|  27-01-2007, 18:14 | #2 | 
| Senior Member Iscritto dal: Jun 2002 Città: Piacenza - Bergamo 
					Messaggi: 1688
				 | 
		Avendo forzato il login soltanto tramite ssl, il server (correttamente) ti rifiuta l'autenticazione e l'accesso tramite normale ftp in chiaro. Devi usare sftp, ftp-tls o qualche altro client che permetta di usare una connessione ftp over ssl. 
				__________________ Good Kitty: "Jo'z heer!" | 
|   |   | 
|  28-01-2007, 11:49 | #3 | 
| Senior Member Iscritto dal: Dec 2004 Città: Roma 
					Messaggi: 571
				 | 
		GRAZIE!!!!!!!!!!Ok, allora tolgo l' SSL per l'utente locale e lo lascio solo per gli anonimi (che tanto usano filezilla come client)...sai dirmi per caso se devo aprire qualche porta in particolare su iptables per l' FTP/SSL? Al momento la mia conf del firewall è la seguente: # Generated by iptables-save v1.3.5 on Sat Jan 27 13:12:23 2007 *filter :INPUT DROP [60:5731] :FORWARD DROP [0:0]  UTPUT ACCEPT [436:59938] -A INPUT -i lo -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m tcp --dport 4662 -j ACCEPT -A INPUT -p udp -m udp --dport 4672 -j ACCEPT -A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:1536 -j TCPMSS --clamp-mss-to-pmtu COMMIT # Completed on Sat Jan 27 13:12:23 2007 | 
|   |   | 
|  28-01-2007, 13:56 | #4 | 
| Senior Member Iscritto dal: Jun 2002 Città: Piacenza - Bergamo 
					Messaggi: 1688
				 | 
		Devi aprire ed inoltrare al tuo server le porte 20, 21. Se hai abilitato il "passive mode" dovrai anche aprire e fare il forward del range di porte che hai indicato con le opzioni pasv_min_port e pasv_max_port.
		 
				__________________ Good Kitty: "Jo'z heer!" | 
|   |   | 
|  28-01-2007, 14:31 | #5 | 
| Senior Member Iscritto dal: Dec 2004 Città: Roma 
					Messaggi: 571
				 | 
		ok, lo so che son un rompico*****, ma visto che ci sono ci provo....è consigliabile usare il modo passivo o no (l'avevo già chiesto invano nella sezione networking)?Cosa cambia in termini di sicurezza e velocità di trasferimento?se attivo il passive mode e decido di utilizzare solo quello su determinate porte, a quel punto posso chiudere le porte 20 e 21 o devono cmq restare aperte?che range di porte mi consigli di aprire per il passive?
		 | 
|   |   | 
|  28-01-2007, 14:58 | #6 | ||||
| Senior Member Iscritto dal: Jun 2002 Città: Piacenza - Bergamo 
					Messaggi: 1688
				 | Quote: 
  Quote: 
 Ovviamente una porta lasciata aperta è un rischio soltanto quando dall'altra parte c'è un demone in ascolto e questo ha dei noti bug che permettano di sfruttare vulnerabilità remote: se aggiorni regolarmente vsftpd non dovresti correre particolari rischi; al massimo disabilitalo quando non lo usi... Quote: 
 Quote: 
  ) 
				__________________ Good Kitty: "Jo'z heer!" | ||||
|   |   | 
|  28-01-2007, 15:17 | #7 | 
| Senior Member Iscritto dal: Dec 2004 Città: Roma 
					Messaggi: 571
				 | 
		che dire...sono davvero senza parole...è tutto chiarissimo!!!!ora provo la modalità passiva, aprendo la porta 21, e altre due a 5 cifre...vediamo come va! grazie!grazei!grazie!       Ultima modifica di gabasr581 : 28-01-2007 alle 15:57. | 
|   |   | 
|   | 
| Strumenti | |
| 
 | 
 | 
Tutti gli orari sono GMT +1. Ora sono le: 17:13.









 
		 
		 
		 
		







 
  
 



 
                        
                        










