how to close open ftp connections?
2013-11
I use FileZilla, and I thought when a session ended, it automatically closed the ftp connection, but that doesn't appear to have happened because now I'm getting a "530 Sorry, the maximum number of connections (10) for your host are already connected." error. Is there a way to find any open ftp connections and close them from my end? Or, do I have to contact the host?
On Linux, and most Unixen IIRC, there is the netstat
utility. By itself, it will show you what active connections there are. For example:
$ netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 foo.example.com:uuidgen nfs1.example.com:nfs ESTABLISHED
tcp 0 0 foo.example.com:ssh bar.example.com:54993 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ] DGRAM 88654 @/com/ubuntu/upstart
ans do forth.
Probably the other clients connect from the same IP. Also, if you want to close a connection, you can always use tcpdrop(1)
:
$ tcpdrop myhost.net:2353 example.com:ftp
- You can close it if you have access to a router using in this connection data transport.
- You can change FileZilla to other program.
- You can disconnect connections from ftp administration.
- You can kill process handling that connections.
I'm getting baffled by a seemingly simple problem: When I connect via VPN to my remote network, I can't connect via FTP to my FTP server - but I can do everything else (including Remote Desktop).
I've tried completely disabling the remote Firewall and I can ping the FTP Server successfully, but I still can't FTP to it.
If I use the command prompt I get:
ftp> open 10.0.2.1
Connected to 10.0.2.1.
Connection closed by remote host.
I thought it was probably the Firewall... but obviously it's not. What else could be blocking it?
It's a Windows Server 2008 R2 machine running IIS7 (natch). On the machine itself I can navigate to ftp://localhost and see the files, I just can't do it when I'm "local" to it via VPN.
Thanks for any help, I'm sure it's something really simple...!
If you can connect you have port 21 opened. However that is not all that is needed as port 21 is just control port and ftp server opens other ports for data transmission. See if there is something withing your firewall config that can unblock FTP as a whole service (not only port 21).
Also you should probably stay away from FTP active connections and do passive instead. Unfortunately the ftp
command supports only active ones.
Set IE to do passive mode and try using it from other machine like ftp://10.0.2.1.