LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vsftpd - 500 Illegal PORT command. ftp: bind: Address already in use (https://www.linuxquestions.org/questions/linux-newbie-8/vsftpd-500-illegal-port-command-ftp-bind-address-already-in-use-4175700953/)

ceantuco 09-22-2021 09:39 AM

vsftpd - 500 Illegal PORT command. ftp: bind: Address already in use
 
Hi,

I just installed vsftpd on Debian 11 server. I am able to connect to it; however, when I attempt to issue commands such as ls, dir, get or put I get the error below:

Code:

500 Illegal PORT command.
ftp: bind: Address already in use

I am using UFW and I opened ports 21 and 20:

Code:

21/tcp                    ALLOW      Anywhere                 
20/tcp                    ALLOW      Anywhere

See setting below in vsftpd.conf:

Code:

connect_from_port_20=YES
When I installed ufw, i ran the commands below:

Code:

ufw default deny incoming
ufw default allow outgoing

When I disable the firewall, FTP works as expected.

Please assist
Thank you!

Turbocapitalist 09-22-2021 10:01 AM

It's more complicated than that. You need to specify using passive FTP on the client side.

However, why are you installing FTP at all?

ceantuco 09-22-2021 10:34 AM

Hi Tubocapitalist,

We use it to transfer non critical files internally only. No external access to FTP at all.

I did not have this issue with CentOS 8 using FirewallD.

Thank you!

Turbocapitalist 09-22-2021 10:40 AM

Thanks. You'd still be better off using SFTP instead, even for in-house. FTP is a royal pain to set up and even once it is set up there is no way to make it secure. Having it LAN-only helps, but removing FTP takes out even that threat while at the same time saving you a lot of work. Nearly everything made in the last decade supports SFTP now even if it might be known for supporting FTP.

What client software made you reach for FTP instead of SFTP?

ceantuco 09-22-2021 10:45 AM

We had a RPG programmer who created custom programs on our main frame. One of those programs uses FTP to export a file.

I do not want to configure passive mode therefore, I have two options:

1) disable ufw temporarily to run the RPG program

2) manually transfer the file from the mainframe.

Thank you!

ceantuco 09-24-2021 01:48 PM

Update: I had to remove Debian 11 and install Debian 10 instead due to other issues.... well FTP is working correctly even with the firewall enabled.
Thanks!


All times are GMT -5. The time now is 08:48 AM.