---
- hosts: centos8_init
user: ioniere
become: yes
tasks:
- name: vsftpd 설치
yum:
name: vsftpd
state: latest
- name: vsftpd.conf 수정 1 - 20번 포트 미사용
lineinfile:
path: /etc/vsftpd/vsftpd.conf
regexp: '^connect_from_port_20=YES$'
line: connect_from_port_20=NO
- name: vsftpd.conf 수정 2 - chroot 주석해제
lineinfile:
path: /etc/vsftpd/vsftpd.conf
regexp: '^#chroot_local_user=YES$'
line: chroot_local_user=YES
- name: vsftpd.conf 수정 3 - ipv4 listen
lineinfile:
path: /etc/vsftpd/vsftpd.conf
regexp: '^listen=NO$'
line: listen=YES
- name: vsftpd.conf 수정 4 - ipv6 listen off
lineinfile:
path: /etc/vsftpd/vsftpd.conf
regexp: '^listen_ipv6=YES$'
line: listen_ipv6=NO
- name: 기타 추가 설정
blockinfile:
path: /etc/vsftpd/vsftpd.conf
insertafter: EOF
block: |
use_localtime=YES
max_clients=30
max_per_ip=5
pasv_enable=YES
pasv_min_port=50001
pasv_max_port=50005
allow_writeable_chroot=YES
- name: vsftpd 구동
service:
name: vsftpd
state: started
enabled: yes
host, user는 상황에 맞게 수정 후 사용
방화벽 설정은 별도로 진행(21, 50001, 50002, 50003, 50004, 50005)
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 공지 | 2025 일본 여행 계획 | 김영훈 | 2024.10.10 | 2467 |
| 공지 | 현금, 저축, 투자, 지출, 예산, 보험 내역(2024-05-30) | 김영훈 | 2024.03.10 | 2019 |
| » | CentOS8 vsftpd 설치 - centos8_vsftpd.yml | 김영훈 | 2019.10.01 | 954 |
| 7 | CentOS8 svn 설치 - centos8_svnserver.yml | 김영훈 | 2019.09.30 | 570 |
| 6 | CentOS8 MariaDB 저사양용 - /etc/my.cnf.d/mariadb-server.cnf | 김영훈 | 2019.09.30 | 214 |
| 5 | CentOS8 npm 설치(저사양) - centos8_npm.yml | 김영훈 | 2019.09.30 | 4817 |
| 4 | kvm virt-install 예시 | 김영훈 | 2019.09.30 | 933 |
| 3 | 인터넷 익스플로러 cockpit 사용 불가 | 김영훈 | 2019.09.30 | 232 |
| 2 | CentOS7 docker_ce 설치 - centos7_docker.yml | 김영훈 | 2019.09.29 | 990 |
| 1 | CentOS8 초기 설정 - centos8_init.yml | 김영훈 | 2019.09.29 | 452 |