VSFTP Login Error: 227 Entering Passive Mode

Source: Internet
Author: User
Tags ftp protocol ftp transfer

1.VSFTP Login Error: 227 Entering Passive Mod

Server installed Vsftp, due to the iptables limit, the file can not be uploaded to the FTP server, see the route is good, log in to see.


2. Causes and Solutions

This is due to the FTP active mode. When the client connects to FTP, the default is passive mode, to change the FTP server mode to passive.

#将vsftpd的模式修改为被动模式, add the following three lines to the configuration file, restart the VSFTP service

Pasv_enable=yes

pasv_min_port=30000

pasv_max_port=30999


Firewall allows client 210.21.18.205 access

/sbin/iptables-a input-p tcp-s 210.21.18.205--dport 5021-i eth3-j ACCEPT

/sbin/iptables-a input-p tcp-s 210.21.18.205--dport 30000:30999-i eth3-j ACCEPT


3. Principle: FTP Transfer Mode

There are two modes of data transmission in FTP protocol: Active mode and passive mode.


The two modes initiate the connection in the opposite direction, the active mode is initiated from the server side to the client, and the passive mode is the client initiates the connection to the server side.


But if there is a firewall between the server and the customer, the active mode often causes some trouble. Imagine that the client is behind a firewall and the firewall allows all internal connections to be made externally, but there are many limitations to externally initiated connections. In this case, the customer can establish a control connection with the server normally, and if you use active mode, data transfer commands such as LS, put, and get are difficult to run successfully because the firewall blocks the data transfer connection from the server to the customer. The simple packet filtering firewall separates the control connection and the data transfer connection completely, so it is difficult to configure the firewall to allow active mode FTP data transfer connections. If the firewall allows ICMP or TCP RST messages to pass, the client will return the connection refused error message immediately, and if the firewall is simply discarded, it will cause the client program to hang for a period of time.


This article is from "Kaka West" blog, please be sure to keep this source http://whnba.blog.51cto.com/1215711/1619597

VSFTP Login Error: 227 Entering Passive Mode

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.