FreeBSD(9.2) - PureFTPd
Installing from binary package:
If you don't need to use SSL, you can install it from binary package:
If you need to use SSL, you have to install it from ports, because the package is not compiled with SSL support:
Installing from ports:
Go to the pure-ftpd directory from the ports tree and tun "make install". Don't forget to check the SSL/TLS box:
If you need to connect using lftp to a ftp server that requires SSL, you have to set a few lftp parameters:
If you don't need to use SSL, you can install it from binary package:
root@freebsd:~ # pkg install pure-ftpd
If you need to use SSL, you have to install it from ports, because the package is not compiled with SSL support:
root@freebsd:~ # /usr/local/sbin/pure-ftpd -g/var/run/pure-ftpd.pid -A -c50 -B -C8 -D -E -fftp -H -I15 -lpuredb:/usr/local/etc/pureftpd.pdb -L10000:8 -m4 -p30000:50000 -s -U113:002 -u100 -k99 -Z -Y2 -4
pure-ftpd: invalid option -- Y
pure-ftpd: invalid option -- 2
root@freebsd:~ # ldd /usr/local/sbin/pure-ftpd
/usr/local/sbin/pure-ftpd:
libcrypt.so.5 => /lib/libcrypt.so.5 (0x801239000)
libpam.so.5 => /usr/lib/libpam.so.5 (0x801458000)
libc.so.7 => /lib/libc.so.7 (0x80081b000)
Installing from ports:
Go to the pure-ftpd directory from the ports tree and tun "make install". Don't forget to check the SSL/TLS box:
root@freebsd:~ # cd /usr/ports/ftp/pure-ftpd/Generating SSL certificate:
root@freebsd:/usr/ports/ftp/pure-ftpd # make install
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pemTesting with lftp:
If you need to connect using lftp to a ftp server that requires SSL, you have to set a few lftp parameters:
root@freeBSD92:~ # cat ~/.lftprcIf you do not set these parameters, you will get a error like "[Delaying before reconnect: XX]" or "Fatal error: SSL_connect: self signed certificate", if you are using a self signed certificate.
set ftp:ssl-allow true
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ftp:ssl-protect-list true
set ssl:verify-certificate no
Comments
Post a Comment