반응형

저는 ubuntu 20.04에서 구축을 해보았습니다.

 

1. proftpd 설치

sudo apt install proftpd

 

2. proftpd 설정

vi /etc/proftpd/proftpd.conf

설정 예시

 

<Global>
    DisplayLogin welcome.msg
    DisplayChdir .message
    DenyFilter \*.*/,"%"
    ListOptions "-l"
    DefaultRoot ~
    RequireValidShell on
    MultilineRFC2228 on
    ShowSymlinks on

    TimeoutNoTransfer 600
    TimeoutStalled 600
    TimeoutIdle 1200

    Umask 022 022
    AllowOverwrite on
    AllowStoreRestart on

    TransferLog /var/log/proftpd/xferlog
    IdentLookups off

    MaxClients none
    DeferWelcome on
    SetENV TZ :/etc/localtime
</Global>

<VirtualHost ftp.test.com>    : 아파치 처럼 virtualhost를 지정해 줄 수 있다
    ServerName "My FTP"
    Port 21
    ServerAlias ftp.test.com
    DefaultServer on
    DefaultRoot ~
    TransferLog /var/log/proftpd/test.log
    DisplayLogin welcome.msg

        <Limit LOGIN>
            DenyAll
            AllowUser test, test1
        </Limit>

        <Limit Write>
            DenyAll
            AllowUser test
        </Limit>
</VirtualHost>

 

3. ftp 계정 추가

adduser 계정명

 

4. ftp 계정 ssh 차단

vi /etc/ssh/sshd_config

DenyUsers test   : test계정 접속 차단

 

sudo service ssh restart

'리눅스' 카테고리의 다른 글

Nginx 설치  (0) 2022.02.24
Ubuntu 한글 패키지 설치 및 설정  (0) 2022.01.19
[리눅스 방화벽]firewall-cmd  (0) 2021.10.19
DNS 레코드 종류  (0) 2021.10.18
본딩  (0) 2021.10.15

+ Recent posts