Bobcares

227 entering passive mode in VsFTPd – Related errors and fixes for you

by | May 3, 2019

Poorly secured FTP services can be one of the causes of server attacks.

However, VsFTPd servers come with restricted root privileges, making it one of the safer FTP servers.

Sometimes, the VsFTPd server may not work as we expect and result in “227 Entering Passive Mode ftp: connect: Connection timed out error.

It happens mainly due to improper passive port range configuration in the server.

Today, we’ll see how our Support Engineers fixed the error as part of our Server Management Services.

 

What is VsFTPd?

VsFTPd is a secure, stable, and fast FTP server. Also, VsFTPd becomes the preferred FTP server for many sites that need simultaneous downloads.

In addition, a FTP server is vulnerable to server attacks because of cleartext password authentication. Password sniffing attacks that collect user names and passwords from the network are common in FTP server.

However, the VsFTPd server is more secure and the malicious user finds it more difficult to compromise directly. Because it does not use usernames, passwords. Also, VsFTPd does not run with root privileges. By default, VsFTPd transfers each file in binary mode to improve security.

Moreover, 227 entering passive mode in VsFTPd is a response code given by the server and indicates that the server is ready to connect to the client for establishing a data connection.

 

 

How we fixed issues related to 227 entering passive mode in VsFTPd

From our experience in managing servers, we’ve seen that many customers experiencing errors related to VsFTPd.

Let’s see how our Support Engineers fixed these issues.

 

1. Missing passive port range

Recently, one of the customers reported us with a problem after logging in VsFTPd server, he couldn’t list files using the command “ls” and results in an error like this,

ftp> ls
227 Entering Passive Mode (192,168,122,55,220,105)
ftp: connect: Connection timed out

Then our Support Engineers took the following steps to solve the error.

1. Firstly, we checked /var/log/vsftpd.log file to identify the cause of this error.

2. We found that the error is due to the improper passive port range configuration in /etc/vsftpd.conf file.

3. Therefore, we opened the port range 64000-64321 in /etc/vsftpd.conf file.

pasv_min_port=64000
pasv_max_port=64321

4. At last, we restarted the service VsFTPd.

service vsftpd restart

 

That’s solved the error. Now the directory listing is done by “ls” command.

 

2. Firewall blocks IP

Similarly, another customer had a directory listing issue with VsFTPd server. After executing the command “ls”, he was getting an error like 227 Entering Passive Mode ftp: connect: Connection timed out.

1. Firstly, our Support Engineers analyzed /var/log/vsftpd.log file to identify the cause of this error. We found an entry corresponding to the IP firewall blocks the request.

2. After that, we checked the  “ip_conntrack_ftp” module is enabled or not. The module was not activated in the firewall configuration file.

3. So, we enabled the “ip_conntrack_ftp” module in the FTP server’s iptables configuration.

For firewall like Iptables,

3.1. To add “ip_conntrack_ftp” module, open /etc/sysconfig/iptables-config file add the following code as shown below.

# stored in /etc/modprobe.conf.
IPTABLES_MODULES=”ip_conntrack_ftp”

4. In addition, we make sure that the passive port range has enabled in the VsFTPd configuration file.

5. Now, we restarted the iptables and VsFTPd services.

That fixed the error and the user could list the directory without any error.

 

[Getting 227 entering passive mode VsFTPd connect connection timed out error? We’ll fix it for you.]

 

Conclusion

In short, 227 entering passive mode in VsFTPd is a response given by the server. It indicates that the server is ready to connect to the client for establishing a data connection. Today, we saw how our Support Engineers fixed the error related to 227 entering passive mode in VsFTPd.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF