Compare commits

...

2 Commits

Author SHA1 Message Date
Paolo Asperti 342593fb8b
some docs update
continuous-integration/drone/tag Build is passing Details
2022-03-29 10:14:18 +02:00
Paolo Asperti 0bfeed1515
MAXCLIENTS configuration 2022-03-29 10:14:11 +02:00
3 changed files with 18 additions and 3 deletions

View File

@ -45,7 +45,7 @@ services:
ports: ports:
- "21:21" - "21:21"
- "20:20" - "20:20"
- "50000-50500:50000-50500" - "21210-21220:21210-21220"
volumes: volumes:
- "/srv/ftps/auth:/auth" - "/srv/ftps/auth:/auth"
- "/srv/ftps/conf:/etc/proftpd/custom.conf.d:ro" - "/srv/ftps/conf:/etc/proftpd/custom.conf.d:ro"
@ -53,11 +53,20 @@ services:
- "/etc/letsencrypt:/certs:ro" - "/etc/letsencrypt:/certs:ro"
environment: environment:
- MASQUERADE=ftp.mydomain.com - MASQUERADE=ftp.mydomain.com
- PASSIVEPORTS_START=21210
- PASSIVEPORTS_END=21220
- MAXCLIENTS=500
- MAXCLIENTSPERHOST=100
- TLS_CERT=/certs/live/ftp.mydomain.com/cert.pem - TLS_CERT=/certs/live/ftp.mydomain.com/cert.pem
- TLS_KEY=/certs/live/ftp.mydomain.com/privkey.pem - TLS_KEY=/certs/live/ftp.mydomain.com/privkey.pem
- TLS_CHAIN=/certs/live/ftp.mydomain.com/chain.pem - TLS_CHAIN=/certs/live/ftp.mydomain.com/chain.pem
``` ```
## passive ports
If you want to change the passive ports range (which by default is 50000-50050), you can do so via environment variables (PASSIVEPORTS_START and PASSIVEPORTS_END).
In any case, you also have to enable a matching range of exposed ports.
## notes ## notes
Please note that you have to restart the container (or send sighup to proftpd) whenever the certificate is renewed. Please note that you have to restart the container (or send sighup to proftpd) whenever the certificate is renewed.

View File

@ -8,8 +8,6 @@ AllowRetrieveRestart On
WtmpLog off WtmpLog off
UseReverseDNS off UseReverseDNS off
DefaultRoot ~ DefaultRoot ~
Maxclients 30
MaxClientsPerHost 5
<IfModule mod_tls.c> <IfModule mod_tls.c>
TLSEngine on TLSEngine on

8
run.sh
View File

@ -55,6 +55,14 @@ PASSIVEPORTS_END=${PASSIVEPORTS_END:-50050}
echo "PassivePorts ${PASSIVEPORTS_START} ${PASSIVEPORTS_END}" > /etc/proftpd/conf.d/passive_ports.conf echo "PassivePorts ${PASSIVEPORTS_START} ${PASSIVEPORTS_END}" > /etc/proftpd/conf.d/passive_ports.conf
############ MAX CLIENTS
MAXCLIENTS=${MAXCLIENTS:-30}
MAXCLIENTSPERHOST=${MAXCLIENTSPERHOST:-5}
echo "Maxclients ${MAXCLIENTS}" > /etc/proftpd/conf.d/maxclients.conf
echo "MaxClientsPerHost ${MAXCLIENTSPERHOST}" >> /etc/proftpd/conf.d/maxclients.conf
############ START CRON ############ START CRON
crond -b crond -b