vsFTPd and iptables - how to configure them in CentOS 5.5?

Posted by Vincenzo on Server Fault See other posts from Server Fault or by Vincenzo
Published on 2010-06-03T08:24:33Z Indexed on 2010/06/03 8:27 UTC
Read the original article Hit count: 282

Filed under:
|

I've installed vsFTPd in CentOS 5.5, on TWO servers, and added this rule to their iptable-s:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

Looks like this is not enough, since when I'm trying to upload a file from one server to another, I'm getting this result (IP address is masked):

# ftp 99.99.99.99
Connected to …com (99.99.99.99).
220 (vsFTPd 2.0.5)
Name (99.99.99.99:root): vinny
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (99,99,99,99,107,74)
ftp: connect: No route to host

I've found a few articles in the net about the second rule I have to add to iptables, but I didn't find the right syntax for it. Could you please help?

© Server Fault or respective owner

Related posts about centos

Related posts about vsftpd