Previous |
Home | Next |
Version: | - vsftpd 2.0.4 |
[bash]# cp
/etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.original [bash]# vi /etc/vsftpd/vsftpd.conf |
banner_file=/etc/vsftpd/welcome.banner |
ftpd_banner=Welcome to
my vsFTPd Server. |
If the banner_file
and ftpd_banner
are both enabled, then the banner_file
is displayed before the ftpd_banner. |
dirmessage_enable=YES |
message_file=.message |
listen=YES |
tcp_wrappers=NO |
anon_umask=077 local_umask=022 |
nopriv_user=ftp |
pasv_enable=YES |
xferlog_enable=YES xferlog_file=/var/log/xferlog |
pam_service_name=vsftpd |
anon_root=/var/ftp |
[bash]# chkconfig
--level 345 vsftpd on [bash]# chkconfig --list vsftpd |
[bash]# /etc/init.d/vsftpd
restart [bash]# grep vsftpd /var/log/messages |
anonymous_enable=YES |
anonymous_enable=NO |
#anon_upload_enable=YES #anon_mkdir_write_enable=YES |
Always
avoid where possible, allowing anonymous users the ability to upload
files to the FTP server. This has the potential to allow users of
pirate software to abuse your system for further distribution. Always
check the files on a regular basis for any sign of abuse. |
anon_max_rate=10485760 local_max_rate=0 |
max_clients=500 max_per_ip=4 |
Do not put anonymous in /etc/vsftpd.ftpuser file, it does nothing. Anonymous access must be disabled with "anonymous_enable=NO" parameter. |
userlist_enable=YES userlist_file=/etc/vsftpd/user_list |
local_enable=YES write_enable=YES |
chroot_local_user=YES |
Using chroot_local_user
is handy for allowing users to access their "public_html" directories
on a publicly shared web server. |
chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list |
If "chroot_list_enable=YES", then the /etc/vsftpd.chroot_list file contains a selective list of users that are jailed to their home directories. If "chroot_local_user=YES" is also set, then the entries in the /etc/vsftpd.chroot_list are users that are not jailed; the opposite effect. |
You
should only enable TLS/SSL if you really need it. If you only intend to
cater for anonymous users on your server, then you should not implement
encryption. |
[bash]# ldd /usr/sbin/vsftpd | grep ssl |
libssl.so.6 => /lib/libssl.so.6 (0x001bf000) |
PREFERRED
METHOD.. [bash]# cd /etc/pki/tls/certs [bash]# make vsftpd.pem |
ALTERNATE
METHOD.. [bash]# openssl req -x509 -nodes -days 730 -newkey rsa:1024 \ -keyout /etc/pki/tls/certs/vsftpd.pem \ -out /etc/pki/tls/certs/vsftpd.pem |
Country Name (2 letter code) [GB]:AU State or Province Name (full name) [Berkshire]:QLD Locality Name (eg, city) [Newbury]:Brisbane Organization Name (eg, company) [My Company Ltd]:Miles Brennan Organizational Unit Name (eg, section) []:Home Linux Server Common Name (eg, your name or your server's hostname) []:galaxy.example.com Email Address []:[email protected] |
If you are using the server for legitimate business use and you want to provide a level of security assurance to your customers, then you should use a key that has been signed by a Certificate Authority. |
[bash]# cat /etc/pki/tls/certs/vsftpd.pem [bash]# openssl x509 -in /etc/pki/tls/certs/vsftpd.pem -noout -text |
[bash]# chmod 600 /etc/pki/tls/certs/vsftpd.pem |
[bash]# vi /etc/vsftpd/vsftpd.conf |
ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=NO force_local_logins_ssl=YES ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO rsa_cert_file=/etc/pki/tls/certs/vsftpd.pem |
[bash]# /etc/init.d/vsftpd restart |
For TLS/SSL encryption
to be fully implemented, the FTP
client application also needs to support secure connections. |
Previous |
Home | Next |