c/S service architecture
Typical service mode: C/s,client/server
A resource or a function provided by the server
Clients use resources or features
Server: An application capable of providing some kind of resource or function
Need to listen to a port on the server for an IP address
Client: An application that has access to a resource or feature
Ability to connect to server-side programs via IP address, port number
Application layer protocol: a set of communication protocols that the server and the client adhere to together
Common network services:
———————————————————————————— +
Type | Resources, Features | Application Layer Protocol |
File Transfer | File Download, upload | FTP |
website | Web browsing | HTTP |
Domain name | Internet Address Finder | DNS |
Remote machine | Operating System Installation | Dhcp,pxe |
Virtualization | Virtual Machines | ----- |
Mail | E-mail Delivery | Smtp,pop3,imap |
Remote Sync | Incremental backup, directory mirroring | RSYNC |
———————————————————————————— +
FTP Service Overview: File Transfer Protocol based on C/s structure
The FTP session layer belongs to a composite TCP connection:
Control connection: TCP 21 port, sending FTP command information
Data connection: TCP 20 port, uploading data
Data connection mode
Active Mode: server 2 Port-Active connection-"client"
Passive mode: Server XX Port-Passive connection-Client
XX port range must be pre-qualified
Transfer mode
Text mode: ASCLL mode, text sequence transfer
Binary mode: Binary mode, binary sequence transfer
FTP User type
Anonymous User: FTP or Anonymous
Local User: Linux Server native System user account
Virtual User: Account information is stored in a separate file or database
VSFTPD Service Basics
Service Programs and scripts
Service Program:/USR/SBIN/VSFTPD
System Services Script:/ETC/INIT.D/VSFTPD
Configuration directory:/ETC/VSFTPD
Master configuration file: vsftpd.conf
FTP Command Tool
Format: FTP server address
Log in as prompted (anonymous user can be any password)
[[Email protected] ~]# FTP 192.168.4.254
Connected to 192.168.4.254 (192.168.4.254).
(VsFTPd 2.2.2)
Name (192.168.4.254:root): Anonymous
331 Specify the password.
Password:
Successful Login.
Remote system type is UNIX.
Using binary mode to transfer files.
Ftp>
Enter in ftp>? List of available commands
Download: Get/mget,wget
Uploaded: Put/mput
LCD switch local directory, quit or by exit
Use! External shell command operation can be recalled
Common Global configuration FTP configuration (enabled for Yes, off to No)
Listen: Whether to monitor the service in a standalone manner
Listen_address: Set the IP address of the Listening FTP service
Listen_port: Setting Ports to listen for FTP services
Write_enable: Whether Write permission is enabled
Download_enable: whether to allow download
Anonymous_enable: Whether to enable anonymous access
Anon_root: Root directory for anonymous FTP
Local_root: FTP root directory for Local Users
Local_umask: Permission mask uploaded by local user
Chroot_local_user: Whether to imprison the master directory
User Access Control
Blacklist file:/etc/vsftpd/ftpusers included in which the user is tight = Forbidden access
Black/White list file:/etc/vsftpd/user_list
Userlist_enable=yes
Userlist_deny=yes|no
Whether to start this file when determined by userlist_enable
When Userlist_deny=yes, this file is blacklisted, otherwise the whitelist
FTP Connection and Transmission control
concurrency limit, broadband limit
Max_clients: Limit the number of concurrent clients
MAX_PRE_IP: Limit the number of concurrent connections per client IP
Anon_max_rate: Anonymous Max Speed (Bytes/sec)
Local_max_rate: Verify user Maximum speed (Bytes/sec)
Service Listening Address
Concept:
Which network interface The system service is serving
Like listen_address=192.168.1.1.
Refers to an IP address of the server, not the client address
If not specified, the default is to listen on all interfaces
Linux Fundamentals 13