0

I just installed vsftpd, configuration is following:

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
user_sub_token=$USER
local_root=/home/$USER/ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
userlist_deny=NO
allow_writeable_chroot=YES
port_enable=YES
pasv_enable=Yes
pasv_address=XX.XX.XX.XX (public ip of router)
pasv_min_port=1100
pasv_max_port=1100

It works fine when I'm trying to establish connection localy. However I can't get into it outside local network. I redirected port on router 1100 to local port 21.

When I'm trying to connect log shows that connection is being established but client cannot list a directories /home/$USER/ftp. I've tried to use two clients total commander and winscp (both the same result).

Total commander returned:


Connect to: (02.04.2022 11:48:21)
hostname=XX.XX.XX.XX:1100
username=gryzak
startdir=
XX.XX.XX.XX=XX.XX.XX.XX
220 (vsFTPd 3.0.3)
USER Login
331 Please specify the password.
PASS ***********
230 Login successful.
SYST
215 UNIX Type: L8
FEAT
211-Features:
 EPRT
 EPSV
 MDTM
 PASV
 REST STREAM
 SIZE
 TVFS
211 End
HELP SITE
214-The following commands are recognized.
 ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD
 MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR
 RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
 XPWD XRMD
214 Help OK.
OPTS UTF8 ON
200 Always in UTF8 mode.
Connect ok!
PWD
257 "/" is the current directory
Download the catalog 
TYPE A
200 Switching to ASCII mode.
PORT <Local IP>,202,58
500 Illegal PORT command.
PASV
227 Entering Passive Mode (0,0,0,0,4,76).
Server reports local IP -> Redirect to: XX.XX.XX.XX
Connected to PASV port
LIST

Total Commander view after connection

Does anyone have some why these folders cannot be listed?

Ubuntu 20.04.4 LTS

2

0

You must log in to answer this question.

Browse other questions tagged .