Skip to content

Commit dcdc8d1

Browse files
authored
Merge pull request hestiacp#1123 from hestiacp/feature/1089-proftpd_tls_support
Feature/1089 proftpd tls support
2 parents 6825a8e + a241853 commit dcdc8d1

File tree

6 files changed

+84
-2
lines changed

6 files changed

+84
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
- `UPGRADE_SEND_EMAIL` = Sends an email notification to admin email address
1010
- `UPGRADE_SEND_EMAIL_LOG` = Sends installation log output to admin email address
1111
- Upgrade process will now save logs to the `hst_backups` directory.
12+
- Add support Proftpd TLS Support
1213
- Add the possibility to assign user "Administrators" rights on login. Replaces "root" login. Notifications are only send towards the "admin" account email
1314

1415
## Buggfixes

install/deb/proftpd/proftpd.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ServerAdmin root@localhost
44
DefaultServer on
55
DefaultRoot ~ !adm
66

7+
Include /etc/proftpd/tls.conf
8+
79
<IfModule mod_vroot.c>
810
VRootEngine on
911
VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf

install/deb/proftpd/tls.conf

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# Proftpd sample configuration for FTPS connections.
3+
#
4+
# Note that FTPS impose some limitations in NAT traversing.
5+
# See http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-TLS.html
6+
# for more information.
7+
#
8+
<IfModule mod_dso.c>
9+
# If mod_tls was built as a shared/DSO module, load it
10+
LoadModule mod_tls.c
11+
</IfModule>
12+
<IfModule mod_tls.c>
13+
TLSEngine on
14+
TLSLog /var/log/proftpd/tls.log
15+
# this is an example of protocols, proftp works witl all, but use only the most secure ones like TLSv1.1 and TLSv1.2
16+
TLSProtocol TLSv1.1 TLSv1.2
17+
#
18+
# Server SSL certificate. You can generate a self-signed certificate using
19+
# a command like:
20+
#
21+
# openssl req -x509 -newkey rsa:1024 \
22+
# -keyout /etc/ssl/private/proftpd.key -out /etc/ssl/certs/proftpd.crt \
23+
# -nodes -days 365
24+
#
25+
# The proftpd.key file must be readable by root only. The other file can be
26+
# readable by anyone.
27+
#
28+
# chmod 0600 /etc/ssl/private/proftpd.key
29+
# chmod 0640 /etc/ssl/private/proftpd.key
30+
#
31+
TLSRSACertificateFile /usr/local/hestia/ssl/certificate.crt
32+
TLSRSACertificateKeyFile /usr/local/hestia/ssl/certificate.key
33+
#
34+
# CA the server trusts...
35+
#TLSCACertificateFile /etc/ssl/certs/CA.pem
36+
# ...or avoid CA cert and be verbose
37+
#TLSOptions NoCertRequest EnableDiags
38+
# ... or the same with relaxed session use for some clients (e.g. FireFtp)
39+
#TLSOptions NoCertRequest EnableDiags NoSessionReuseRequired
40+
#
41+
#
42+
# Per default drop connection if client tries to start a renegotiate
43+
# This is a fix for CVE-2009-3555 but could break some clients.
44+
#
45+
#TLSOptions AllowClientRenegotiations
46+
#
47+
TLSOptions NoSessionReuseRequired AllowClientRenegotiations
48+
# Authenticate clients that want to use FTP over TLS?
49+
#
50+
#TLSVerifyClient off
51+
#
52+
# Are clients required to use FTP over TLS when talking to this server?
53+
#
54+
TLSRequired off
55+
#
56+
# Allow SSL/TLS renegotiations when the client requests them, but
57+
# do not force the renegotations. Some clients do not support
58+
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
59+
# clients will close the data connection, or there will be a timeout
60+
# on an idle data connection.
61+
#
62+
TLSRenegotiate required off
63+
</IfModule>

install/hst-install-debian.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ cp /etc/vsftpd.conf $hst_backups/vsftpd > /dev/null 2>&1
681681

682682
# Backup ProFTPD configuration
683683
systemctl stop proftpd > /dev/null 2>&1
684-
cp /etc/proftpd.conf $hst_backups/proftpd > /dev/null 2>&1
684+
cp /etc/proftpd/* $hst_backups/proftpd > /dev/null 2>&1
685685

686686
# Backup Exim configuration
687687
systemctl stop exim4 > /dev/null 2>&1
@@ -1298,6 +1298,8 @@ if [ "$proftpd" = 'yes' ]; then
12981298
echo "[ * ] Configuring ProFTPD server..."
12991299
echo "127.0.0.1 $servername" >> /etc/hosts
13001300
cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
1301+
cp -f $HESTIA_INSTALL_DIR/proftpd/tls.conf /etc/proftpd/
1302+
13011303
update-rc.d proftpd defaults > /dev/null 2>&1
13021304
systemctl start proftpd >> $LOG
13031305
check_result $? "proftpd start failed"

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ cp /etc/vsftpd.conf $hst_backups/vsftpd > /dev/null 2>&1
654654

655655
# Backup ProFTPD configuration
656656
systemctl stop proftpd > /dev/null 2>&1
657-
cp /etc/proftpd.conf $hst_backups/proftpd > /dev/null 2>&1
657+
cp /etc/proftpd/* $hst_backups/proftpd > /dev/null 2>&1
658658

659659
# Backup Exim configuration
660660
systemctl stop exim4 > /dev/null 2>&1
@@ -1339,6 +1339,7 @@ if [ "$proftpd" = 'yes' ]; then
13391339
echo "[ * ] Configuring ProFTPD server..."
13401340
echo "127.0.0.1 $servername" >> /etc/hosts
13411341
cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
1342+
cp -f $HESTIA_INSTALL_DIR/proftpd/tls.conf /etc/proftpd/
13421343
update-rc.d proftpd defaults > /dev/null 2>&1
13431344
systemctl start proftpd >> $LOG
13441345
check_result $? "proftpd start failed"

install/upgrade/versions/1.3.0.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@
55
#######################################################################################
66
####### Place additional commands below. #######
77
#######################################################################################
8+
9+
if [ "$FTP_SYSTEM" == "proftpd" ]; then
10+
if [ -e /etc/proftpd/proftpd.conf ]; then
11+
rm /etc/proftpd/proftpd.conf
12+
fi
13+
if [ -e /etc/proftpd/tlss.conf ]; then
14+
rm /etc/proftpd/tls.conf
15+
fi
16+
17+
cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
18+
cp -f $HESTIA_INSTALL_DIR/proftpd/tls.conf /etc/proftpd/
19+
20+
fi

0 commit comments

Comments
 (0)