banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

18. FTP on CentOS7

FTP on CentOS7 - VSFTP#

Experimental Environment:#

  1. CentOS7: 192.168.0.1
  2. Windows7: 192.168.0.100

Preparation:#

  1. Install vsftp on CentOS7 yum -y install vsftpd
  2. Start vsftp service: systemctl start vsftpd
  3. Understand the main configuration file of vsftp: /etc/vsftpd/vsftpd.conf

Experiment 1: Understanding the User Authentication Mechanism of vsftp#

Anonymous User: anonymous User Directory: /var/ftp#

How to disable anonymous user login: anonymous_enable=NO

Local User: Regular Linux user User Directory: Regular user's user directory#

Guest User (Virtual User): No local user, it is a sub-user "parasitic" under the Linux regular user#

Configuration process of virtual users

  1. Create a "regular user" (disable shell function)

  2. Create a virtual user configuration file /etc/vsftpd/vuser

    Create two users

    UsernamePassword
    down123
    up321
  3. Generate local user data files through the virtual user configuration file

  4. Modify the authentication file /etc/pam.d/vsftpd

  5. Modify the main configuration file /etc/vsftpd/vsftpd.conf

  6. Create virtual user configuration files /etc/vsftpd/vuserconf/down /etc/vsftpd/vuserconf/up

  7. Configure the login directories for down and up: /var/vuser; Define down for download only; up can upload and download

  8. Restart the service to make the configuration effective: systemctl restart vsftpd

  9. Verify the results on the Windows7 client

Experiment 2: Secure FTP Site Service (Certificate Encryption: FTPS)#

Characteristics of ftp protocol data transmission: plaintext ------> ciphertext

  1. Create public and private keys

    Private key: s.key Request file: s.csr Public key (certificate): s.crt

  2. Modify the main configuration file to enable vsftp to support encrypted transmission

  3. Restart the service to make the configuration file effective

  4. Verify the ftps site through the client

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.