vsftpd FTP server problems.
Hi all!
I've installed vsftpd FTP server and everything seems to work fine. No error is logged, but when I try to connect to my server with gFTP client the files that I've got in the user directory is not shown. Here is the output of gFTP: 220 Welcome to FTP service of FTPServer. USER nuno 331 Please specify the password. PASS xxxx 230 Login successful. SYST 215 UNIX Type: L8 TYPE I 200 Switching to Binary mode. PWD 257 "/home/nuno" PASV 227 Entering Passive Mode (197,25,121,95,168,8) As you can see everything seems to work fine, but I can see the files of the directory. I made made "chmod -R 777 /home/nuno" but even though it doesn't work. Here is the output of ftp command running from remote machine: root@gateway:~# ftp 197.25.121.95 Connected to 195.23.121.29. 220 Welcome to FTP service of FTPServer. Name (197.25.121.95:root): nuno 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. -rwxr-xr-x 1 0 0 14 Oct 19 19:09 teste.txt 226 Directory send OK. ftp> exit 221 Goodbye. As you can see I've got one file in my home directory. What could be wrong? Here is my configuration: listen=YES check_shell=YES dirlist_enable=YES log_ftp_protocol=YES ls_recurse_enable=YES local_enable=YES write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) #local_umask=022 # anon_upload_enable=NO anon_mkdir_write_enable=NO dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES Any help will be greatly appreciated! |
Hi, hope I am not leading you in the wrong direction....but make sure your client has PASV enabled and if behind a firewall you need to set high and low port ranges in /etc/vsftpd.conf(check docs for how to do this)and then let those ports through your firewall.
|
Hi all!!
Now I know where is the problem but I can't understand why. The problem is my firewall that is blocking some kind of traffic. I don't understand because I'm giving permissions to access port 21. Here is my iptables rules: iptables -A INPUT -m state --state NEW -p tcp --dport 21 -j ACCEPT iptables -A INPUT -m state --state NEW -p udp --dport 21 -j ACCEPT I used a sniffer to analyze the traffic and the client is not trying to access any other port. There's one exception, some packets seems to be redirect to upper ports (greater than 1024), I think it's the server that redirect this traffic. If I stop iptables (allow everything) everything works well. What could be the port that I shouldn't block? My server is only listening on this ports: 37, 113, 21 and 22. Any help would be greatly appreciated. Nuno Paquete |
All times are GMT -5. The time now is 11:02 AM. |