{"id":7543,"date":"2018-06-05T14:05:28","date_gmt":"2018-06-05T06:05:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=7543"},"modified":"2018-06-05T14:05:40","modified_gmt":"2018-06-05T06:05:40","slug":"vsftpd","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7543","title":{"rendered":"vsftpd"},"content":{"rendered":"<p>This howto describes how to configure vsftpd to enable SSL using so called intermediate\/ chaining certificates.<\/p>\n<p>Edit vsftpd.conf so that SSL is enabled:<\/p>\n<p>&nbsp;<\/p>\n<p>ssl_enable=YES<\/p>\n<p>rsa_cert_file=\/usr\/share\/ssl\/certs\/vsftpd.pem<\/p>\n<p>force_local_data_ssl=No<\/p>\n<p>force_local_logins_ssl=NO<\/p>\n<p>It is very important to construct the certificate file \/usr\/share\/ssl\/certs\/vsftpd.pem with the correct certificate order. The fist Your certificate file has to be a .pem file. If you also received an Intermediate Certificate then you have to concatenate this with the Domain Certificate and your Private Key file into one single .pem file. Make sure all the information is included, without any spaces or blanks, see below.<\/p>\n<p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<\/p>\n<p>(your_domain_name.crt)<\/p>\n<p>&#8212;&#8211;END CERTIFICATE KEY&#8212;&#8211;<\/p>\n<p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<\/p>\n<p>(chaining certificate 3)<\/p>\n<p>&#8212;&#8211;END CERTIFICATE KEY&#8212;&#8211;<\/p>\n<p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<\/p>\n<p>(chaining certificate 2)<\/p>\n<p>&#8212;&#8211;END CERTIFICATE KEY&#8212;&#8211;<\/p>\n<p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<\/p>\n<p>(chaining certificate 1)<\/p>\n<p>&#8212;&#8211;END CERTIFICATE KEY&#8212;&#8211;<\/p>\n<p>&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;<\/p>\n<p>(your_domain_name.key)<\/p>\n<p>&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;<\/p>\n<p>This is how to check a SSL enabled FTP service (FTP Secure). See the result below:<\/p>\n<p>$ lftp -u username localhost -e &#8220;debug;set ftp:ssl-protect-data true;ls;exit&#8221;<\/p>\n<p>Password:<\/p>\n<p>&nbsp;<\/p>\n<p>$<\/p>\n<p>xferlog_file=\/var\/log\/vsftpd.log<br \/>\nxferlog_enable=YES<br \/>\ndirmessage_enable=YES<br \/>\ndata_connection_timeout=600<br \/>\ndual_log_enable=YES<br \/>\npam_service_name=vsftpd<br \/>\nuserlist_enable=YES<br \/>\ntcp_wrappers=YES<br \/>\nssl_enable=YES<br \/>\nallow_anon_ssl=NO<br \/>\nforce_local_data_ssl=YES<br \/>\nforce_local_logins_ssl=YES<br \/>\nssl_tlsv1=NO<br \/>\nssl_sslv2=NO<br \/>\nssl_sslv3=NO<br \/>\nssl_tlsv1_2=YES<br \/>\nssl_ciphers=HIGH:-3DES:-aNULL<br \/>\nrsa_cert_file=\/etc\/vsftpd\/rmohan.pem<br \/>\npasv_min_port=28000<br \/>\npasv_max_port=30000equire_ssl_reuse=NO<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This howto describes how to configure vsftpd to enable SSL using so called intermediate\/ chaining certificates.<\/p>\n<p>Edit vsftpd.conf so that SSL is enabled:<\/p>\n<p>&nbsp;<\/p>\n<p>ssl_enable=YES<\/p>\n<p>rsa_cert_file=\/usr\/share\/ssl\/certs\/vsftpd.pem<\/p>\n<p>force_local_data_ssl=No<\/p>\n<p>force_local_logins_ssl=NO<\/p>\n<p>It is very important to construct the certificate file \/usr\/share\/ssl\/certs\/vsftpd.pem with the correct certificate order. The fist Your certificate file has to be a .pem file. If [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7543"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7543"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7543\/revisions"}],"predecessor-version":[{"id":7545,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7543\/revisions\/7545"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}