FTP connection between 2 VMs on the same VPN

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
DavidM92
500 Command not understood
Posts: 5
Joined: 2024-04-23 14:39
First name: David
Last name: M

FTP connection between 2 VMs on the same VPN

#1 Post by DavidM92 » 2024-04-23 14:46

I have a VM1 (On Azure) which is also a VPN server (by OpenVPN).
I have another Virtual Machine (VM2) which has a FileZilla Server configured.

From my Local PC (which is also on the VPN), I can connect via FTP to VM2 with the VM2 VPN IP.
But not since VM1, it tells me:

Code: Select all

Status: Connecting to XX.XX.XX.182:21…
Status: Connection established, waiting for welcome message…
Status: Initializing TLS…
Status: TLS connection established.
Status: Connected
Status: Recovering folder contents…
Command: PWD
Answer: 257 "/" is current directory.
Order: TYPE I
Answer: 200 Type set to I
Command: PORT 10,50,8,1,231,163
Response: 200 PORT command successful.
Order: MLSD
Answer: 150 Starting data transfer.
[b]Error: Connection interrupted after 20 seconds of inactivity
Error: Unable to retrieve folder contents[/b]
  • All the parameters are the same on both client.
  • The filezilla client and server are the last version.
  • I tried all possible configurations on client (active/UTF-8/Simple FTP)
  • I opened port 21 on both sides.
  • I tried to desactivate FireWall on VM2
In the FileZilla logs on the VM2 side, I have:
Code: Select all - View in a separate window

Code: Select all

[FTP Session 36 XX.XX.XX.1 FTPserver] GnuTLS error -110 in gnutls_record_recv: The TLS connection was non-properly terminated.
[FTP Session XX.XX.XX.1 FTPserver] Client did not properly shut down TLS connection
[FTP Session XX.XX.XX.1 FTPserver] Control channel closed with error from source 0. Reason: ECONNABORTED - Connection aborted.

User avatar
botg
Site Admin
Posts: 35584
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FTP connection between 2 VMs on the same VPN

#2 Post by botg » 2024-04-23 21:59

The log has been tampered with, it has become useless. Please post a complete and most of all unmodified log. Also post an equally complete and unmodified log from the other side.

DavidM92
500 Command not understood
Posts: 5
Joined: 2024-04-23 14:39
First name: David
Last name: M

Re: FTP connection between 2 VMs on the same VPN

#3 Post by DavidM92 » 2024-04-24 07:37

Bonjour,
J'ai juste masqué mon IP (j'ai voulu mettre en gras le message d'erreur, ce qui a rajouté des balises B, mais le texte n'a pas été modifié).
Que puis je fournir de plus ?
Good morning,
I just hid my IP (I wanted to bold the error message, which added B tags, but the text was not modified).
What more can I provide?
Last edited by boco on 2024-04-24 13:10, edited 1 time in total.
Reason: English please!

User avatar
boco
Contributor
Posts: 26950
Joined: 2006-05-01 03:28
Location: Germany

Re: FTP connection between 2 VMs on the same VPN

#4 Post by boco » 2024-04-24 13:17

IPs and ports are among the most valuable information you can use in log diagnostic. Public IPs are, as their name indicates, public, no need to hide them (security by obscurity does not really work). Private IPs don't nned to be hidden, either, as they are not unique identifiers.

Bold tags do not work inside "code" blocks, as code blocks are supposed to preserve any raw text as-is, unformatted.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

DavidM92
500 Command not understood
Posts: 5
Joined: 2024-04-23 14:39
First name: David
Last name: M

Re: FTP connection between 2 VMs on the same VPN

#5 Post by DavidM92 » 2024-04-29 09:27

Ok, the Filezilla Client Log (The 10.50.8.122 IP is the server):
Status: Connecting to 10.50.8.122:21…
Status: Connection established, waiting for welcome message…
Status: Initializing TLS…
Status: TLS connection established.
Status: Connected
Status: Recovering folder contents…
Command: PWD
Answer: 257 "/" is current directory.
Order: TYPE I
Answer: 200 Type set to I
Command: PORT 10,50,8,1,231,163
Response: 200 PORT command successful.
Order: MLSD
Answer: 150 Starting data transfer.
Error: Connection interrupted after 20 seconds of inactivity
Error: Unable to retrieve folder contents
The FileZilla Server Log (The 10.50.8.1 IP is the client):
[FTP Session 10.50.8.1 FTPserver] GnuTLS error -110 in gnutls_record_recv: The TLS connection was non-properly terminated.
[FTP Session 10.50.8.1 FTPserver] Client did not properly shut down TLS connection
[FTP Session 10.50.8.1 FTPserver] Control channel closed with error from source 0. Reason: ECONNABORTED - Connection aborted.

User avatar
boco
Contributor
Posts: 26950
Joined: 2006-05-01 03:28
Location: Germany

Re: FTP connection between 2 VMs on the same VPN

#6 Post by boco » 2024-04-29 13:57

Your IPs are private LAN IPs, as expected in a VPN. They can not be used to identify you, not even theoretically.

As you are using Active (PORT) Mode, is the client-side firewall and FTP client properly configured to allow incoming connections on all configured data ports?
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

DavidM92
500 Command not understood
Posts: 5
Joined: 2024-04-23 14:39
First name: David
Last name: M

Re: FTP connection between 2 VMs on the same VPN

#7 Post by DavidM92 » 2024-04-29 16:40

Hello:
  • Yes, on client, "active is checked. How can i sure that the server is active too ?
  • Yes the both have a firewall but the 21 port is open on both
  • I think. Because i can send file from my Local on VM2. How can i check it ?

User avatar
boco
Contributor
Posts: 26950
Joined: 2006-05-01 03:28
Location: Germany

Re: FTP connection between 2 VMs on the same VPN

#8 Post by boco » 2024-04-29 19:44

Yes, on client, "active is checked. How can i sure that the server is active too ?
An FTP server cannot be "active" or "passive". It must be prepared for both types of connections, as these are entirely client-dictated.
Yes the both have a firewall but the 21 port is open on both
Port 21 is not enough. FTP uses many more ports for data connections. You need to configure your FTP client with an adequate range of data ports and open this range of ports in the client firewall, too.
think. Because i can send file from my Local on VM2. How can i check it ?
VM2 is configured for Active FTP, it seems.

A word about VM: There are multiple network types for VMs. The default "NAT" puts yet another virtual router device between host and guest. Make sure it uses Bridged.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

DavidM92
500 Command not understood
Posts: 5
Joined: 2024-04-23 14:39
First name: David
Last name: M

Re: FTP connection between 2 VMs on the same VPN

#9 Post by DavidM92 » 2024-04-30 12:05

Hello,

I have open passive ports range in firewall on VM2 and i can connect Vm1 to VM2 by FTP in passive mode.

I will use it, by i can't explain why the active mode fail at the last step (list file).
Can you tell me the other ports must be opened like 20 and 21 ?

Regards

User avatar
boco
Contributor
Posts: 26950
Joined: 2006-05-01 03:28
Location: Germany

Re: FTP connection between 2 VMs on the same VPN

#10 Post by boco » 2024-04-30 12:32

Passive data ports are used by Passive Mode, data ports on the server side. Active data ports are on the client side.

You must configure the Active port range in the FTP client, this will limit what ports it proposes to the server in the PORT command. Open that configured range in the client firewall. You can use ports from any region above 1024, although it is recommended to only use ports from 49152 and above. Amount of ports is maximum number of listings and transfers you can possibly do in four minutes at peak times.

If you cannot configure the FTP client, you need to open the whole 1025-65535 range.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

Post Reply