7

I have a Debian Dedicated server and I want to enable Implicit SSL on it using VSFTPD and I am having a hard time.

I have read online and the only thing I can really find is how to enable SSL and in the man pages it lists one implicit ssl command. but since Implicit ssl uses a second listener (990 by default) I have no idea how to make it work on Debian.

Has anyone managed to get this working?

Here is my config:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
connect_from_port_20=YES
pam_service_name=vsftpd
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=NO
force_local_logins_ssl=NO
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/ssl/certs/vsftpd.pem

if I include Implicit_SSL=YES the server won't even start.

thanks

2
  • Could you explain what problems you are actually having? Why does it not work?
    – sybreon
    Sep 14, 2009 at 1:20
  • when I try to connect I get: Connection attempt failed with "ECONNREFUSED - Connection refused by server". I have updated my main post with some configuration details of VSFTPD
    – Luma
    Sep 14, 2009 at 2:03

6 Answers 6

4

Clearly you'll need to set implicit_ssl=YES in the config file to get anywhere.

But when you do, you can't start the server, of course. So the first thing to do is look at the server's logs, in /var/log/vsftpd.log (or, possibly, the messages went to /var/log/user.log or /var/log/messages, but that's unlikely).

Without seeing that, I can't possibly tell you what the problem actually is, but as a wild guess, I'd say there's a decent chance it's failing to find its server SSL certificate. Other possible contenders for the problem include permission problems, SELinux failures (if you have that enabled), or vsftpd just plain not liking the set of configuration options you gave it - it can be very picky that way, so as to keep you from accidentally leaving it configured in an insecure state. Or there's no lack of other possibilities - that's why you need the logs.

9

Implicit - Assumes that the server is expecting everything encrypted using SSL. This means that when the client first connects to the server it will immediately negotiate the SSL connection on the command connection. Normally Implicit connections are also on a different port such as port 990. So to run vsftpd in implicit mode, you need to set options

implicit_ssl=YES
listen_port=990 

Or

implicit_ssl=YES
listen_port=21 

and configure your ftp client to use 21 port for connection. (FileZilla client, for example, uses 990 port by default, when connecting to implicit server type).

4

I had a similar issue, here is what your config should read:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
connect_from_port_20=YES
pam_service_name=vsftpd
ssl_enable=YES
#The following line enables implicit mode
implicit_ssl=YES
allow_anon_ssl=NO
#This will force secure data connections, not required, but recommended
force_local_data_ssl=YES
#This will force secure logins, not strictly required, but REALLY recommended
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/ssl/certs/vsftpd.pem
#The next line is the magic which I suspect will make this work for you.
#Some distros require explicit private key designation. You may need to regenerate your
#certificate / key pair. A lot of Debian based distros seem to need this step, and will not
#start the server without it.
rsa_private_key_file=<path to private key>.key

That did the trick for me. Also, as you're using tls, not ssl, your server should actually serve on the usual ftp ports. Now most clients on the other hand will look to port 990 for a ftps connection by default, but theres nothing you can really do about that, unless you actually want to serve on port 990. Not a dealbreaker, just a pain. You also might want to consider virtual users, chroot jailing, and passive mode for security, more security, and ease of client connections respectively. Cheers, -Matthias

3

If you take a look at the sourcecode of vsftpd you will see that the first vsftp version containing implicit_ssl is version 2.1.0 even the changelog mentioned this feature for 2.0.7!

Also if you take a look at the config parser in the c sourcecode you will see that the documentation is right and you will have to write the config option all lowercase if you want to enable it!

e.g.: implicit_ssl=yes

1

make sure you specify "implicit_ssl" (all lower case), Implicit_SSL will not work, as you mentioned, the server won't even start

0

are you sure the ftps is only on port 990? The configuration implicit_ssl should activate ftps on port 21 if you don't explicitly set listen_port.

Find out on what ports vsftpd is listening and try to connect via ftps on port 21.

If it still doen't work try to set debug_ssl=YES and take a look at your logs.

Another possibility is, you have a debian vsftpd version, which does not support implicit_ssl. What version of debian and vsftpd do you use? The option has been added by version 2.0.7.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .