0

I'd like to connect to the FileZilla ftp server running on Windows 7 host from ftp client on Slackware guest. I can successfully login, pwd cd, etc. When the mode is passive i can ls or get but when in active (passive == off) i got the following result:

150 Opening data channel for directory listing of "/DNS"
425 Can't open data connection for transfer of "/DNS"
ABOR
226 ABOR command successful

Why doesn't the active mode work? What to do to make it works? I'm running VirtualBox in the NAT network mode with port forwarding enabled.

Mulligan
  • 729
  • 3
  • 12
  • 33

1 Answers1

1

Active and Passive mode communicate differently.

In Passive mode, your computer connects to port 21, then makes a second outbound connection to the server to transfer data.

In Active Mode your computer connects to port 21 on the server, and the server then communicates back from port 20 to your computer.

This all means that passive mode is easier to program, because simple firewalls and NAT gateways tend to allow anything to leave the network, but only related connections to return. In the case of an active mode connection, the router needs to do connection tracking to associate the 2 connections, and this is failing. You are almost certainly running into this problem.

In addition to port forwarding you will need to load connection tracking (and probably FTP connection tracking) modules. This will vary depending on your host OS, but could be nf_conntrack_ftp or nf_nat_ftp under Linux.

davidgo
  • 73,366