#######################################################################
#Script Name: proftpd.conf
#Version: 1.2
#Description: Proftpd conf for DA.
#Last Modify Date: 03162021
#Author:Brent Dacus
#Email:brent[at]thedacus[dot]net
#######################################################################
ServerName		"ProFTPd"
ServerType          	standalone

Port                    0
<VirtualHost |IP|>
        Port 21
	AuthUserFile	/etc/proftpd.passwd
</VirtualHost>

PassivePorts		35000 35999
UseReverseDNS		off
TimesGMT		off
TimeoutLogin		120
TimeoutIdle		600
TimeoutNoTransfer	900
TimeoutStalled		3600

ScoreboardFile  /var/run/proftpd.scoreboard
PidFile			/var/run/proftpd/proftpd.pid

TransferLog		/var/log/proftpd/xferlog.legacy
LogFormat		default "%h %l %u %t \"%r\" %s %b"
LogFormat		auth    "%v [%P] %h %t \"%r\" %s"
LogFormat		write   "%h %l %u %t \"%r\" %s %b"

#DON'T modify this log format.  Its used by DirectAdmin to determine user usage
LogFormat		userlog "%u %b %m %a"
ExtendedLog		/var/log/proftpd/|IP|.bytes WRITE,READ userlog

AuthUserFile                    /etc/proftpd.passwd
DefaultServer		on
AuthOrder mod_auth_file.c
ListOptions		-a
#AuthPAM off

<IfModule mod_tls.c>
	TLSEngine on
	TLSLog /var/log/proftpd/proftpd.tls.log
        TLSProtocol ALL -TLSv1 -TLSv1.1
        TLSCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
        TLSVerifyClient off
        TLSRequired off
	
	#Certificates
	TLSRSACertificateFile /etc/exim.cert
	TLSRSACertificateKeyFile /etc/exim.key
	#TLSCACertificateFile /etc/ftpd/root.cert.pem

	TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
</IfModule>

<Global>
	PassivePorts            35000 35999
	DeferWelcome		on

	RequireValidShell	no

	DefaultRoot		~
	DirFakeUser on ftp
	DirFakeGroup on ftp

	User			ftp
	Group			ftp
	#UserAlias		anonymous ftp

	AllowStoreRestart	on
	AllowRetrieveRestart	on

	Umask			022
	DisplayLogin		welcome.msg
	DisplayChdir		readme
	AllowOverwrite		yes
	ExtendedLog		/var/log/proftpd/access.log WRITE,READ write
	ExtendedLog		/var/log/proftpd/auth.log AUTH auth
	
	#
	# Paranoia logging level....
	#
	#ExtendedLog    /var/log/proftpd/paranoid.log ALL default

	<IfModule mod_tls.c>
		TLSEngine on
		TLSLog /var/log/proftpd/proftpd.tls.log
		TLSRSACertificateFile /etc/exim.cert
		TLSRSACertificateKeyFile /etc/exim.key
	</IfModule>
</Global>

Include /usr/local/etc/proftpd.sftp.conf
