I'm testing vsftpd in a VM environment with various version of RHEL.
I'm trying to log in from a client to a vsftp server as anonymous, and I can log in, however when I run ls to list files on the vsftpd server, I continue to get:
Code:
ftp> ls
227 Entering Passive Mode (192,168,122,55,220,105)
ftp: connect: Connection timed out
Not sure why, and Googling around, I find a very helpful thread on Linuxquestions.org:
https://www.linuxquestions.org/quest...nnects-903987/
I do what they recommend:
- open ports on iptables 50000-51000
- in /etc/vsftpd/vsftpd.conf, I add the following:
Code:
pasv_enable=yes
pasv_max_port=51000
pasv_min_port=50000
port_enable=YES
pasv_address=192.168.122.50
Restart vsftpd, however it tells me there is a binary error. So I go back to that conf file and comment out the pasv_enable, port_enable and pasv_address. Restart it and it works. I am able to log in as user anonymous, and browse /var/ftp and copy files down to my local server.
The thing is that I'm not understanding the why? This is called passive mode and why when enabling this on iptables, along with making entries under /etc/vsftpd/vstpd.conf, why it worked?