CentOS 7 Build an FTP server

Source: Internet
Author: User
Tags ftp centos iptables

This paper uses the latest CentOS 7来 learning to build a variety of Linux servers, sharing today is to build an FTP server (PS: not recommended to use the latest system to learn, because the system has changed, a lot of previous methods to build the server is not, For example, Centos7 Firewall from Iptables for firewall, and then the original tutorial to build will encounter a lot of problems ..., of course, if you just want to use the server can be installed at the time of the installation of the appropriate options system will automatically install the relevant services) due to my bad luck, So in the installation of the process encountered a variety of exotic problems, and I was a just getting started small rookie, so it took a good 3 days to set up the FTP server. Of course, the process of learning is the process of debug, the problems encountered, the more learned knowledge will be richer, the following to share my experience in the construction of FTP.

The first is to install the CENTOS7 system with a VM

PS: My installation option is the smallest installation, so the built-in software is very few

As for the specific installation, this is not within the scope of this article, if you need to communicate, can Q I ...

If you make sure the network is clear after the installation is complete, if there is no network, please enter the command Nmtui open Network settings

Then we need to change the CENTOS7 firewall back to Iptables

1. To uninstall the firewall, you need to perform the following command

2. Install Iptables-services

3. Open Iptables Service

4. Set the firewall to boot

5. Generate iptables configuration files under the/etc/sysconfig folder

Next install the FTP server vsftp

Configuring firewalls

Open/etc/sysconfig/iptables with Vim

(PS: Must be placed in

-A input-j REJECT--reject-with icmp-host-prohibited

-A forward-j REJECT--reject-with icmp-host-prohibited

These two rules precede, because the rules of the firewall are parsed from top to bottom.

Although the firewall is set up, but does not mean that the FTP server can be used properly, we have to configure SELinux

Through Getsebool-a | grep FTP We can see that SELinux is a ban on all FTP services, in order to be able to properly use we need to

ftp_home_dir,ftpd_connection_db Two Boolean variable set to True

PS: If you do not open this will not be able to upload and download files Oh! O (∩_∩) o~)

Through the above settings we can finally use the FTP service! Test below Windows

Just go and experience it!!!

Note : More wonderful tutorials Please pay attention to the triple computer tutorial section, triple Computer office group: 189034526 welcome you to join

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.