From e97d9d4c3edeceb6a75109bea52c111c5daf870b Mon Sep 17 00:00:00 2001 From: Matthos Denys Date: Sat, 6 Mar 2021 16:19:01 +0300 Subject: [PATCH] da --- srcs/ftps/Dockerfile | 18 ++++++------------ srcs/ftps/vsftpd.conf | 31 +++++++++++++++---------------- srcs/yaml/metallb.yaml | 2 +- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/srcs/ftps/Dockerfile b/srcs/ftps/Dockerfile index 5f4f1b4..2f40bbc 100644 --- a/srcs/ftps/Dockerfile +++ b/srcs/ftps/Dockerfile @@ -1,17 +1,11 @@ -FROM alpine:3.12.3 -RUN apk update -RUN apk add vsftpd openssl -RUN echo "root:root" | chpasswd -RUN echo "mdenys:mdenys" | chpasswd -RUN mkdir -p /var/ftp -RUN adduser -D -h /var/ftp mdenys -RUN openssl req -x509 -nodes -days 365 \ - -newkey rsa:2048 -subj \ - "/C=RU/ST=ru/L=Russia/O=21_schoo/CN=mdenys_services" \ - -keyout /etc/ssl/private/vsftpd.key \ - -out /etc/ssl/certs/vsftpd.crt +FROM alpine:3.12.3 +RUN apk update && apk add vsftpd openssl +RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -subj "/C=RU/ST=ru/L=Russia/O=21_schoo/CN=mdenys_services" -keyout /etc/ssl/private/vsftpd.key -out /etc/ssl/certs/vsftpd.crt COPY vsftpd.conf /etc/vsftpd/ COPY start.sh . RUN chmod +x start.sh +RUN adduser -D user +RUN echo "user:user" | chpasswd +RUN chown user:user /home/user EXPOSE 20 21 21000 CMD sh start.sh \ No newline at end of file diff --git a/srcs/ftps/vsftpd.conf b/srcs/ftps/vsftpd.conf index 5078fec..abec281 100644 --- a/srcs/ftps/vsftpd.conf +++ b/srcs/ftps/vsftpd.conf @@ -1,27 +1,26 @@ -anonymous_enable=YES -dirmessage_enable=YES -xferlog_enable=YES -connect_from_port_20=YES -listen=YES -seccomp_sandbox=NO +anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 -chroot_local_user=NO -chroot_list_enable=YES -chroot_list_file=/etc/vsftpd/chroot.list +listen=YES +dirmessage_enable=YES +xferlog_enable=YES +pam_service_name=vsftpd +pasv_enable=YES +pasv_min_port=21000 +pasv_max_port=21000 +port_enable=YES allow_writeable_chroot=YES +seccomp_sandbox=NO ssl_enable=YES +rsa_cert_file=/etc/ssl/certs/vsftpd.crt +rsa_private_key_file=/etc/ssl/private/vsftpd.key allow_anon_ssl=NO force_local_data_ssl=YES force_local_logins_ssl=YES -require_ssl_reuse=NO ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO -rsa_cert_file=/etc/ssl/certs/vsftpd.crt -rsa_private_key_file=/etc/ssl/private/vsftpd.key -pasv_enable=YES -pasv_min_port=30000 -pasv_max_port=30000 -pasv_address=$__CLUSTER_EXTERNAL_IP__ \ No newline at end of file +pasv_address=192.168.99.120 +chroot_local_user=YES +background=NO \ No newline at end of file diff --git a/srcs/yaml/metallb.yaml b/srcs/yaml/metallb.yaml index c83e8d2..4031082 100755 --- a/srcs/yaml/metallb.yaml +++ b/srcs/yaml/metallb.yaml @@ -9,4 +9,4 @@ data: - name: default protocol: layer2 addresses: - - 192.168.99.165-192.168.99.200 \ No newline at end of file + - 192.168.99.120-192.168.99.200 \ No newline at end of file