Linux FTP-related configuration (CentOS 6.x)

Source: Internet
Author: User
Tags ftp connection

1, installation vsftpd:

Check if install:rpm-qa | grep vsftpd

Install without any information:yum install-y vsftpd

Configure the firewall to turn on port 21 and restart the firewall:/etc/sysconfig/iptables add:-A input-m State--state new-m tcp-p TCP--dport 21-j ACCEPT

2, start vsftpd Pre-configuration (recommended to close selinux, reduce unnecessary configuration):

VSFTPD connection mode recommended for passive mode (Passive mode):/etc/vsftpd/vsftpd.conf add: Pasv_enable=yes

Do not understand the FTP active and passive mode, here is a blog post:

    Http://www.cnblogs.com/mawanglin2008/articles/3607767.html

Restart the VSFTPD service and configure the boot default boot:chkconfig--level vsftpd on

3, some related configuration and description see: Configuration file/etc/vsftpd/vsftpd.conf

------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------

  Restart the service vsftpd every time you modify the configuration file to take effect!

4, most of the FTP connection software is a passive mode link, here to explain the FTP connection software passive mode connection of some settings:

Previously recommended blog post mentioned: Because the passive mode, the server side open port random, but the firewall should not be all open, the solution is:

  Open random ports in the FTP server configuration passive mode (you can set port segments on any 1024, such as 10000-10100)

/etc/vsftpd/vsftpd.conf Add the following configuration:

  

  Then set the rules in the firewall to open the port-side between server-side 10000-10100  

  /etc/sysconfig/iptables add:-A input-m State--state new-m tcp-p TCP--dport 10000:10100-j ACCEPT

-----------------------------------------------------------------------------------------------------------

Of course there are many other configurations, such as restricting the upload download bandwidth, restricting the IP address that the client can connect, restricting the number of an IP connection, and so on, here does not repeat!!!

  

Linux FTP-related configuration (CentOS 6.x)

Related Article

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.