OpenWrt Forum Archive

Topic: Vsftpd strange behaviour in passive mode

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I had my edimax br-6104kp running on midge / openwrt with 2.4 kernel running for quite a while.
I used vsftpd as ftp server witch was installed on the usb harddisk i had attached.
A few weeks ago my harddisk died... and of course i did not make a backup of my config files......

No i got vsftpd runing again, but when i connect from an external ip the vsftpd server sends back the internal ip address...... so the
external client is not able to connect (passive mode). I can override the ip addres vsftpd sends back, but this causes my internal clients to fail connecting, because the receive the external ip.....
I use xinetd

vsftpd should look to the connect socket to find the right ip, but this seems to fail.
Does anyone knows what's wrong?


vsftpd.conf:

background=YES
listen=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
check_shell=NO
#dirmessage_enable=YES
#ftpd_banner=Welcome to blah FTP service.
session_support=NO
syslog_enable=YES
#userlist_enable=YES
#userlist_deny=NO
#userlist_file=/etc/vsftpd.users
#xferlog_enable=YES
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
secure_chroot_dir=/mnt/usb/var/empty
chroot_local_user=YES
pasv_enable=YES
#pasv_address=213.17.10.82
connect_from_port_20=NO
pasv_min_port=50000
pasv_max_port=50010
port_enable=YES

(Last edited by mrx on 10 Jul 2008, 16:59)

Make sure you have the conntrack module for ftp installed.

Thanks for the reply!

I dont realy get it. I never used conntrack module and it worked fine. I'll try to find this module.
As far as i know this is a ip-tables/netfilter module, but the firewall is disabled because i use a second firewall..... (router / modem)

If you are not doing nat on your edimax then you do not need the conntrack module on it. If you are doing nat on another router then that router needs to do comeation tracking for ftp. The ftp protocol will include your internal ip address for the edimax but the conntrack module on the nat router will modify it to be the wan ip of the nat router.

The discussion might have continued from here.