LINUX vsftpd Simple Description __linux

Source: Internet
Author: User
Rpm-qa | grep vsftpd Check if software is installed
Yum install-y vsftpd Install vsftpd software vi/etc/sysconfig/iptables add tcp21 port service Iptab Les restart reboot firewall setsebool Ftpd_disable_trans 1 Remove selinux protection Setsebool ftp_home_dir=1

vi/etc/vsftpd/vsftpd.conf Modify VSFTPD configuration information
Pasv_enable=no adds this line at the end, making the configuration passive mode

Service vsftpd start VSFTPD services Chkconfig vsftpd on set to default startup NETSTAT-TUNLP | grep vsftpd Check to see if VSFTPD software listens for Port 21

Modify the default port vi/etc/vsftpd/vsftpd.conf modify VSFTPD configuration information
Listen_port=2112 adds this line at the end so that the listening port is 2112

Vi/etc/sysconfig/iptables Add tcp2112 port service iptables Restart Reboot Firewall service VSFTPD r Estart Restart VSFTPD Service

Test port

Limit upload Download Bandwidth vi/etc/vsftpd/vsftpd.conf Modify VSFTPD configuration information
anon_max_rate=300000 at the end of this line, restrict the anonymous user transfer rate to 300KB local_max_rate=300000 add the row at the end, restricting Local user transfer rate is 300KB
Service vsftpd Restart Restart VSFTPD Services


Configure the bandwidth of a specific user vi/etc/vsftpd/vsftpd.conf modify VSFTPD configuration information User_config_dir=/etc/vsftpd/guanli at the end add this row, with Set the profile directory that manages user bandwidth (optionally, the configuration file directory path that manages user bandwidth)

Mkdir/etc/vsftpd/guanli Create a configuration folder to manage user bandwidth Vi/etc/vsftpd/guanli/apple Create a profile for Apple user Bandwidth control
local_max_rate=300000 Configure Apple user bandwidth to 300KB
Service vsftpd Restart Restart VSFTPD Services


Restrict client individual IP address can connect server vi/etc/vsftpd/vsftpd.conf modify VSFTPD configuration information
Tcp_warppers=yes Check to see if yes, default Yes
Vi/etc/hosts.deny Edit Restriction profile
Vsftpd:all:Deny to add this line at the end to restrict all network segments from being able to connect

Vi/etc/hosts.allow Edit the configuration file that allows connections
Vsftpd:192.168.100.*:allow at the end of this line, the open 192.168.100.* network segment can be connected


Restrict blacklist user vi/etc/vsftpd/vsftpd.conf Modify VSFTPD configuration information
Userlist_enable=yes Check to see if yes, default is yes (if no, blacklist feature does not take effect)

Vi/etc/vsftpd/user_list Edit blacklist configuration file
Apple's new restricted account

Allow Anonymous logon, do not allow normal user login (change this line to no to achieve the effect Local_enable=no) vi/etc/vsftpd/vsftpd.conf Modify VSFTPD configuration information
Anonymous_enable=yes defaults to Yes, enable Anonymous logon, set to No to turn off Local_enable=yes default Yes, enable PU Universal user Login, set to No is off
Service vsftpd Restart Restart VSFTPD Services

Allow normal user to log in, do not allow Anonymous Logon (change this line to No to achieve effect Anonymous_enable=no) vi/etc/vsftpd/vsftpd.conf Modify VSFTPD configuration information
Anonymous_enable=yes defaults to Yes, enable Anonymous logon, set to No to turn off Local_enable=yes default Yes, enable PU Universal user Login, set to No is off
Service vsftpd Restart Restart VSFTPD Services
Limit the number of an IP connection vi/etc/vsftpd/vsftpd.conf modify VSFTPD configuration information
Max_per_ip=3 the last row, configure the number of connections = 3
Service vsftpd Restart Restart VSFTPD Services
vi/etc/vsftpd/vsftpd.conf Modify VSFTPD configuration information

Limit idle time too long is broken line vi/etc/vsftpd/vsftpd.conf modify VSFTPD configuration information
Idle_session_timeout=30 By default # is not enabled, remove # to enable and change to 30 seconds
Service vsftpd Restart Restart VSFTPD Services

Prohibit user from switching directories (displayed in/directory when user logs in, this directory belongs to his personal user directory) vi/etc/vsftpd/vsftpd.conf modify VSFTPD configuration information
Chroot_local_user=yes By default # is not enabled, remove # to restrict all users can not switch directories
Service vsftpd Restart Restart VSFTPD Services
Demo Create an FTP user useradd-g FTP (user group)-d/home/apple (create the owning user directory)-s/sbin/nologin (login type) apple (create user) passwd Apple useradd-g FTP (user group) -d/home/banana (Create the owning user directory)-s/sbin/nologin (login type) banana (create user) passwd banana

Restricting specific users from switching user directories to vi/etc/vsftpd/vsftpd.conf modifying VSFTPD configuration information
Chroot_list_enable=yes Default has # no enabled, remove # to enable restrictions
CD/ETC/VSFTPD into the VSFTPD directory, create a list of banned directories touch chroot_list create a banned list Record VI chroot_list configuration ban list Directory
Apple new user banned from switching user directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.