Skip to content

Commit 8541365

Browse files
committed
proftpd
1 parent c2f943b commit 8541365

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

proftpd/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
### Configuración proftpd
2+
3+
- **proftpd.conf**: Limita el acceso a un solo usuario enjaulado en ese directorio home el cual será "/mnt/ftp".
4+
5+
- **tls.conf**: Configura el certificado SSL en el servidor con modo de conexión FTPES (FTP explícito).
6+
7+
- **generar-certificado-autofirmado.sh**: Crea el directorio /etc/proftpd/ssl y genera los certificados autofirmados con OpenSSL estableciendo una conexión segura hacia servidor FTP.
8+
9+
**Habilitar servicio ProFTPD**
10+
11+
- *Añadir al PATH.*
12+
```
13+
export PATH=$PATH:/lib/systemd/
14+
```
15+
16+
- *Habilitar el servicio de proftpd con inicio automático después de reiniciar el sistema.*
17+
```
18+
systemctl enable proftpd
19+
```
20+
o también
21+
```
22+
/lib/systemd/systemd-sysv-install enable proftpd
23+
```
24+
25+
- *Reiniciar servicio proftpd.*
26+
```
27+
systemctl restart proftpd
28+
systemctl status proftpd
29+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Crea directorio donde se almacerán los certificados para la conexión segurida FTP con proftpd.
2+
mkdir /etc/proftpd/ssl
3+
# Genera certificados con OpenSSL
4+
openssl req -new -x509 -days 365 -nodes -out /etc/proftpd/ssl/proftpd.cert.pem -keyout /etc/proftpd/ssl/proftpd.key.pem

proftpd/proftpd.conf

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Configuración proftpd
2+
3+
ServerName "adryan"
4+
DefaultRoot /mnt/ftp
5+
Include /etc/proftpd/conf.d/
6+
Include /etc/proftpd/tls.conf
7+
8+
# Limitar la conexión solo a un usuario, será enjaulado dentro del directorio DefaultRoot /mnt/ftp
9+
10+
<Limit LOGIN>
11+
AllowUser usuario
12+
DenyAll
13+
</Limit>

proftpd/tls.conf

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Configuración FTPES explícito para proftpd
2+
3+
<IfModule mod_tls.c>
4+
TLSEngine on
5+
TLSLog /var/log/proftpd/tls.log
6+
TLSProtocol SSLv23
7+
TLSOptions NoCertRequest
8+
9+
# El directorio /etc/proftpd/ssl deberá estar creado previamente
10+
11+
TLSRSACertificateFile /etc/proftpd/ssl/proftpd.cert.pem
12+
TLSRSACertificateKeyFile /etc/proftpd/ssl/proftpd.key.pem
13+
TLSVerifyClient off
14+
TLSRequired on
15+
</IfModule>

0 commit comments

Comments
 (0)