I have a rented VPS wieh debian installed. Recently I've installed proftpd in order to allow read-only access to everybody & full access for the particular users.
I configured proftpd (with TLS) according to several guides. I've unlocked passive ports (those and port 21 via iptables) and set up anonymous login.
When I log in, everything's all right - fast login, fast walking through dirs...problem occurs when I try to download a file - winscp/filezilla/python, all get stuck on downloading a file and then loose connection (files are ~1kB, so very small). When I am connected through SFTP to the server, I have no problems and full speed.
Any ideas? Do you need my proftpd.conf
file?
Update:
I see that I need to add some information, thanks to the first comment (about SCP):
- I'd like to be able to view files anonymously, best would be via web browser, but it's n ot a must.
- I need to set up an application that synchronizes whole folder from VPS with folder on my hdd (I plan to do this via python, but shell/bash is good as well)
- I'd like to be able to download/upload either whole catalog or only those file, that have changed
- I need this to be doable without 3rd party programs. Either through cmdline/bash or official python libraries. Needs to work on both Windows and Fedora
My iptables configuration:
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ssh-ddos tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpts:60000:65535
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-ssh-ddos (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
I've turned off TLS, connected via guest account, turned binary mode on and started tcpdump on port 21 (serverside ofc). Then I've made a 'get' on a single file and after a while I got "Connection closed by remote host". Here is ftp input:
ftp> get light.cfg
200 PORT command successful
150 Opening BINARY mode data connection for light.cfg (94 bytes)
Connection closed by remote host.
and here You can see get and connection_closed separated by a new line:
15:12:15.836468 IP (tos 0x0, ttl 119, id 30359, offset 0, flags [DF], proto TCP (6), length 67)
83-144-76-138.static.chello.pl.54225 > vz31640.dahost.pl.ftp: Flags [P.], cksum 0x5526 (correct), seq 139:166, ack 575, win 7618, length 27
15:12:15.836636 IP (tos 0x0, ttl 64, id 50952, offset 0, flags [DF], proto TCP (6), length 69)
vz31640.dahost.pl.ftp > 83-144-76-138.static.chello.pl.54225: Flags [P.], cksum 0x7049 (correct), seq 575:604, ack 166, win 115, length 29
15:12:15.856530 IP (tos 0x0, ttl 119, id 30360, offset 0, flags [DF], proto TCP (6), length 56)
83-144-76-138.static.chello.pl.54225 > vz31640.dahost.pl.ftp: Flags [P.], cksum 0xd20f (correct), seq 166:182, ack 604, win 7589, length 16
15:12:15.868348 IP (tos 0x0, ttl 64, id 50953, offset 0, flags [DF], proto TCP (6), length 106)
vz31640.dahost.pl.ftp > 83-144-76-138.static.chello.pl.54225: Flags [P.], cksum 0xba9a (correct), seq 604:670, ack 182, win 115, length 66
15:12:15.934002 IP (tos 0x0, ttl 119, id 30365, offset 0, flags [DF], proto TCP (6), length 40)
83-144-76-138.static.chello.pl.54225 > vz31640.dahost.pl.ftp: Flags [.], cksum 0x0ccc (correct), ack 670, win 7523, length 0
15:13:15.909873 IP (tos 0x0, ttl 119, id 30372, offset 0, flags [DF], proto TCP (6), length 40)
83-144-76-138.static.chello.pl.54225 > vz31640.dahost.pl.ftp: Flags [F.], cksum 0x0ccb (correct), seq 182, ack 670, win 7523, length 0
15:13:15.910056 IP (tos 0x0, ttl 64, id 50954, offset 0, flags [DF], proto TCP (6), length 40)
vz31640.dahost.pl.ftp > 83-144-76-138.static.chello.pl.54225: Flags [F.], cksum 0x29ba (correct), seq 670, ack 183, win 115, length 0
15:13:15.922725 IP (tos 0x0, ttl 119, id 30373, offset 0, flags [DF], proto TCP (6), length 40)
83-144-76-138.static.chello.pl.54225 > vz31640.dahost.pl.ftp: Flags [.], cksum 0x0cca (correct), ack 671, win 7523, length 0