Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Slow transfer speed in proftpd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
roblov
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2005
Posts: 88
Location: Argentina

PostPosted: Sat Feb 10, 2007 6:45 pm    Post subject: Slow transfer speed in proftpd Reply with quote

Hi,

i installed proftpd v1.3.1rc2 and i'm testing my ftp server. I set up only one user with password. The user logs in and tries to download an mp3 file (arounf 3.5 MB) and transfer only gets up to 3% of the file then it stalls. Sometimes, it stalls at 1%.
ftptop shows the other machine is retrieveing the file but no transfer really occurs. I've searched a lot in Google and in the Gentoo forums and nothing really helped, that's why i'm posting this.

Next are proftpd.conf and my firewall script.

proftpd.conf:

Quote:
# Nombre del servidor
ServerName "roblov"

# Forma de arranque del servidor
ServerType standalone

# Mensaje de bienvenida
DeferWelcome on "Bienvenido a roblov.myftp.org"

# Toma opciones predeterminadas
DefaultServer on

# Permite continuar una descarga parcial
AllowRetrieveRestart yes

# Permite continuar una escritura parcial
AllowStoreRestart yes

# Falsificacion del grupo de los directorios
DirFakeGroup on ftp

# Falsificacion del usuario de los directorios
DirFakeUser on ftp

# Timeout de transferencia
TimeoutNoTransfer 600

# Timeout stalled
TimeoutStalled 600

# Timeout idle
TimeoutIdle 600

# Puerto de escucha
Port 21

# Puerto de transferencia de datos
PassivePorts 49152 65535

# Numero maximo de conexiones al servidor
MaxInstances 20

# Mensaje de acceso fallido
AccessGrantMsg "Acceso exitoso"

# Mensaje de acceso fallido
AccessDenyMsg "Acceso fallido"

# DefaultRoot
DefaultRoot ~

UseReverseDNS off
IdentLookups off

# Fichero con usuarios habilitados
AuthUserFile "/etc/passwd"

# Fichero con grupos habilitados
AuthGroupFile "/etc/group"

# Numero maximo de clientes simultaneos
MaxClients 5 "Numero maximo de clientes simultaneos alcanado. Intente despues"

# Numero maximo de clientes con la misma ip
#MaxClientsPerHost 1 "Solo se permite un cliente por cada ip"

# Numero maximo de clientes con la misma cuenta de usuario
#MaxClientsPerUser 1 "Solo se permite un cliente con cada cuenta de usuario"

#MaxHostsPerUser 2

# Shell valida
RequireValidShell off

# Compatibilidad con clientes FTP
MultilineRFC2228 on

# Mostrar links
ShowSymlinks on

# Directorio compartido
<Directory /home/ftp/>
</Directory>


/etc/init.d/firewall:

Quote:
#!/sbin/runscript
IPTABLES=/sbin/iptables
IPTABLESSAVE=/sbin/iptables-save
IPTABLESRESTORE=/sbin/iptables-restore
FIREWALL=/etc/firewall.rules

opts="${opts} showstatus save restore showoptions rules"

depend() {
need net
}

rules() {
stop
ebegin "Setting rules"

einfo "Disallowing incoming ICMP packets"
$IPTABLES -A INPUT -p icmp -j DROP

einfo "Disallowing incoming TCP and UDP connections on most ports"
$IPTABLES -A INPUT -p tcp --syn --dport 631 -j ACCEPT
$IPTABLES -A INPUT -p tcp --syn --dport 6881 -j ACCEPT
$IPTABLES -A INPUT -p tcp --syn --dport 4662 -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 4672 -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 4000 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 21 -m state --state NEW -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 49152:65535 -j ACCEPT
$IPTABLES -A INPUT -p tcp --syn -j DROP
eend $?
}

start() {
ebegin "Starting firewall"
if [ -e "${FIREWALL}" ]; then
restore
else
einfo "${FIREWALL} does not exist. Using default rules."
rules
fi
eend $?
}

stop() {
ebegin "Stopping firewall"
$IPTABLES -F
eend $?
}

showstatus() {
ebegin "Status"
$IPTABLES -L -v --line-numbers
eend $?
}

save() {
ebegin "Saving firewall rules"
$IPTABLESSAVE > $FIREWALL
eend $?
}

restore() {
ebegin "Restoring firewall rules"
$IPTABLESRESTORE < $FIREWALL
eend $?
}

restart() {
svc_stop; svc_start
}

showoptions() {
echo "Usage: $0 {start|save|restore|panic|stop|restart|showstatus}"
echo "start) will restore setting if exists else force rules"
echo "stop) delete all rules and set all to accept"
echo "rules) force settings of new rules"
echo "save) will store settings in ${FIREWALL}"
echo "restore) will restore settings from ${FIREWALL}"
echo "showstatus) Shows the status"
}


Both files may look like made by a beginner. Nothing is closer to the truth! Please have patience with me.

Thanks,

Roblov.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum