Hi all,
I have to create a rule that permits to reach an internal FTP server from the WAN. I read all the topics I could find here on the Community, but couldn't make it work.
Here's the situation.
The internal FTP server is a CentOS7 server that runs VSFTPD. This is the configuration:
anonymous_enable=NOlocal_enable=YESwrite_enable=YESlocal_umask=022dirmessage_enable=YESxferlog_enable=YESconnect_from_port_20=YESxferlog_std_format=YESascii_upload_enable=YESascii_download_enable=YESlisten=YESlisten_ipv6=NOdual_log_enable=YESlog_ftp_protocol=YESpam_service_name=vsftpduserlist_enable=YEStcp_wrappers=NOuse_localtime=YES
pasv_address=<my_public_address>pasv_enable=YESpasv_min_port=50000pasv_max_port=50010
listen_port=9021
As you can see, the non-standard port 9021 is used. Also, I assigned ports 50000-50010 for passive FTP connections.
I created the following rule at the top, called "SFTPE9021" (see screenshots below):
Finally, on XG console, I set:
set service-param FTP add port 9021
set advanced-firewall ftpbounce-prevention data
When I try to connect via FTP from a client, I receive the following messages (FileZilla):
Status: Connecting to <my_public_address>:9021...Status: Connection established, waiting for welcome message...Response: 220 (vsFTPd 3.0.2)Command: USER <my_user>Response: 331 Please specify the password.Command: PASS **********Response: 230 Login successful.Command: OPTS UTF8 ONResponse: 200 Always in UTF8 mode.Status: Logged inStatus: Retrieving directory listing...Command: PWDResponse: 257 "/home/<my_user>"Command: TYPE IResponse: 200 Switching to Binary mode.Command: PASVResponse: 227 Entering Passive Mode (xx,xx,xx,xx,195,82). #I removed the IP
Command: LISTError: The data connection could not be established: ECONNREFUSED - Connection refused by serverError: Connection timed out after 20 seconds of inactivity
With TCPDUMP on the FTP server I can see traffic on port 9021, but none on the 50000-50010.
Also, on XG logs, I see traffic only towards my WAN address (Port2), but none on the FTP server's addresses (public or private). Nothing useful neither on Linux logs on the FTP server.
I think that XG is the problem because setting a local address in the pasv_address parameter in the VSFTPD configuration file, the Passive FTP works fine from inside the LAN.
Do you have any ideas?
Thank you very much!
P.S.
I know that plain FTP is non-secure and other protocols should be used, but it is a request for very old legacy machines... you know the story :)
EDIT: I forgot: I use XG v17.5.0 GA.
This thread was automatically locked due to age.






