vsftpd접속시 xfs 쿼터설정된 사용자별 용량표기 스크립트
# Operation System/Linux2020. 3. 20. 16:01vsftpd접속시 xfs 쿼터설정된 사용자별 용량표기 스크립트

vsftpd.conf dirmessage_enable=YES 위 옵션이 활성화 되어 있어야합니다. 그러면 ftp접속시 사용자 홈폴더에 있는 .message파일안에 있는 내용을 디스플레이해줍니다. script #!/bin/bash arr=(`cat /etc/projects | awk -F: '{print $2}'`) for((i=0;i $user_msg done

centos5 fail2ban 설치
# Operation System/Linux2020. 3. 6. 14:26centos5 fail2ban 설치

yum설치# yum -y install fail2ban# cd /var/log# touch vsftpd.log# chkconfig fail2ban on22. 5. 13일 기준 centos5에서 yum 설치시 에러발생(M2Crypto.SSL.SSLError: unknown protocol)또는 source설치# wget https://github.com/fail2ban/fail2ban/archive/0.8.14.tar.gz# tar -xvzf 0.8.14.tar.gz# cd fail2ban-0.8.14# setup.py install# cp files/redhat-initd /etc/init.d/fail2ban# chkconfig --add fail2ban# chkconfig fail2ban onhttps..

centos7 fail2ban 설정
# Operation System/Linux2020. 3. 6. 13:24centos7 fail2ban 설정

# yum -y install fail2ban fail2ban-systemd # systemctl enable fail2ban # chkconfig fail2ban on # systemctl start fail2ban # systemctl status fail2ban 기본룰 복사# cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local # vi /etc/fail2ban/jail.local 10분간 차단 bantime = 10m 5번 실패시 차단 maxretry = 5 차단해제# fail2ban-client set vsftpd unbanip 1xx.1xx.2xx.2xx 상태확인# fail2ban-client status vsftpd Status for the jail:..

vsftpd 시간이 맞지 않을때
# Operation System/Linux2015. 8. 16. 05:11vsftpd 시간이 맞지 않을때

vsftpd 사용에서 ftp 로그를 보면 시간이 현재 서버 시간과 차이가 나는 경우가 있습니다. 이런 경우는 vaftpd.conf 설정 화일에 아래 내용을 추가 후 ftp 데몬을 재가동 합니다. use_localtime=YES vsftpd 로그를 확인 해보면 시간이 동기화 된것을 볼 수 있습니다.

image