Table of Contents
How To Install Proftpd On FreeBSD
This is quite easy and should not take more than a couple of minuttes.
Note ProFTPD does not use “Virtual Users” like it’s sister PureFTPD. That means you need to have a “Real User Account” in your master password file for proftpd to work.
Installing Proftpd
cd /usr/ports/ftp/proftpd && make install clean BATCH=yes
Once done we need to adjust the configuration slightly to our needs. The configuration file for Proftp is located here /usr/local/etc/proftpd.conf
Change the Server Name. Please note this will have no effect if you are using “ServerIdent Off” So find this line.
ServerName "ProFTPD Default Installation"
And change it to something fancy like the example below.
ServerName "FTP Server"
Next we want to chroot users to their home directory. Find this line.
#DefaultRoot ~
And remove the # so it looks like this.
DefaultRoot ~
If you are not going to use IPV6 turn IPV6 support off by finding this line.
UseIPv6 on
And change it to.
UseIPv6 off
Optional Hide Identity
Ind order to hide your FTP servers identity find this line.
ServerName "ProFTPD Default Installation"
And “above” that line insert the following.
# Hide server identity ServerIdent off
So it looks something like this when done.
# Hide server identity ServerIdent off ServerName "ProFTPD Default Installation"
Optional Set Passive Ports Range
If your firewall requires a passive port range you need to find this line.
Port 21
And below that insert the following “replace 00000 and 99999” with the passive port numbers.
PassivePorts 00000 99999
So it would end up looking something like this.
Port 21 PassivePorts 30000 30200
Test Flight
Once you are ready you can to a “test flight” by sarting proftp up once and see if it works like this.
/usr/local/etc/rc.d/proftpd onestart
If you are satisfied you can then add proftpd to /etc/rc.conf in order for it to start at boot time like this.
proftpd_enable="YES"
A Simple Stripped Down ProFTPD Config File
ServerIdent off ServerName "Ftp Server" ServerType standalone DefaultServer on ScoreboardFile /var/run/proftpd/proftpd.scoreboard Port 21 # PassivePorts 00000 99999 UseIPv6 off Umask 022 MaxInstances 30 CommandBufferSize 512 User nobody Group nogroup DefaultRoot ~ AllowOverwrite on # Bar use of SITE CHMOD by default <limit site_chmod=""> DenyAll </limit>
And we are all done here.