LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2021, 09:39 AM   #1
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Rep: Reputation: 88
Question 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!
 
Old 09-22-2021, 10:01 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,258
Blog Entries: 3

Rep: Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713
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?
 
1 members found this post helpful.
Old 09-22-2021, 10:34 AM   #3
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
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!
 
Old 09-22-2021, 10:40 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,258
Blog Entries: 3

Rep: Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713Reputation: 3713
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?
 
Old 09-22-2021, 10:45 AM   #5
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
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!
 
Old 09-24-2021, 01:48 PM   #6
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 bruvajon Linux - Software 34 11-30-2011 03:08 PM
proftpd 500 illegal port command kgalbraith Linux - Server 5 01-25-2011 05:17 PM
vsftpd ls error: 500 Illegal port command ftp : bind : Adress allready in use shorun Linux - Server 3 11-17-2007 03:35 PM
Ftp Problem (500 Illegal Port Command) Palula Linux - Networking 3 05-08-2006 07:49 AM
vsftpd 500 illegal port command jglazner Linux - Software 3 09-30-2003 04:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration