Click to See Complete Forum and Search --> : Vstpd is not allowing big uploads


Suminigashi
01-16-2006, 06:43 PM
Hello everyone,
I setup vsftpd on my server the other day to allow both anonymous and local users to upload files. However, I am having a problem with people outside my network not being able to upload files bigger than 1meg (not exactly 1 meg just close to it). But if I upload a file to the server from inside my network it can be as big as I want. I have changed various settings inside the vsftpd.conf file and have made sure that my server was sitting outside the DMZ on my router so I'm sure its not a problem with ports. I have also searched google for several hours to find a solution for this problem but I seem to be out of luck. Below is some info that may come in handy:

* The OS that was being used outside the local network to connect was Windows XP
* The error users were receiving was "connection reset by peer"
* The client being used was Window's ftp (the regular command prompt one)
* Here is a copy of the vsftpd.conf file:
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Uncomment this to allow anonymous users to login without a password
#no_anon_password=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
#
# Uncomment this to change the umask value for anonymous file uploads.
anon_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
#dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to Suminigashi's FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
chroot_local_user=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# To run vsftpd in standalone mode (rather than through inetd), uncomment
# the line below.
#listen=YES
If anyone has an idea of what I could do to solve this problem please let me know I would greatly appreciate it.

- Suminigashi

Suminigashi
01-19-2006, 01:58 PM
Well after several more hours of tinkering with it I finally decided to try out proFTP instead and see if that would fair any better. But when I got some of my friends to connect to the server they experienced the same exact problem again. So after that I told them to foward both ports 20 and 21 and turn off PASV mode to see if it would still happen. And wouldn't you know it, it worked perfectly after that. It seems that vsftpd was not the problem, but rather users connecting via PASV mode cannot upload large files for some reason. I would still like to figure out why this is the case though, because they can still use PASV mode for other sites and upload just fine. It just seems for some reason it has problems with PASV mode on my server. Any ideas?

- Suminigashi

pravatpc
01-20-2006, 11:29 AM
Baby, This might be a firewall problem!

Suminigashi
01-21-2006, 01:59 AM
Baby, This might be a firewall problem!

I'm not so sure about that. I checked iptables and there is nothing in there that could hinder transmission of data from my friends. And like a stated in my first post the server ip has been placed in the DMZ so there shouldn't be any problems with the router's built-in firewall effecting the connection.

I tried two more things to try and fix this problem, but nothing did the trick. The first thing I did was update my router's firmware to the most recent version. And I also tried setting the MTU to different values. However, the problem still remains.

*edit* By the way, the router is a Linksys model: BEFW11S4. I doubt this matters but I thought I should post it just in case.

- Suminigashi