FTP connection suddenly causes blocked access

SYSTEM INFORMATION
OS type and version AlmaLinux 9
Virtualmin version 7.30.8

(Just noticed I was copying the wrong version number all this time.)

I currently have Virtualmin running on my server. I would navigate to my site’s FTP root and begin either uploading (or downloading) into the directory a large group of files.

What would happen is that as the directory is downloaded, the server would lose connection suddenly. Additionally, I am unable to access the server (or site) for a period.

Would anyone know of anything that would cause this?

Sounds like a fail2ban block. Normally its a few failed login’s that would cause the block.
fail2ban causes a block for a period of time.

Is there any fix ? I thought adding my home IP to the global ignore would be enough.

Check first the ip is in the list, it maybe something else.

you mean here

Nope IP isn’t listed there and I do see my IP in the list of “never ban” IPs

Right, must be something else, not sure what else.
Maybe check the FTP logs.

So you can’t access web site too, does sound like a firewall issue.

It doesn’t sound like fail2ban to me. If they successfully logged in, fail2ban would have no reason to block them.

Right when I do a bit of heavy FTPing, I lose access to the FTP, Virtualmin, and the main website. I checked with the VPS host and they tell me there is nothing there end blocking me.

Right I was successfully able to login. I thought it might be because I’m using passive FTP?

Maybe check the client ftp to bandwidth limit it, I can’t see it fixing the issue as your going through a provider and they should have heaps of bandwidth. But its something to try.

I (and clients) used to have lots of issues with FTPing - nearly always due to the FTP client app settings - all history now because the use of the excellent File Manager that is built in to Webmin/Virtualmin

lots of files just zip them up and paste it in (or just one at a time if you want to do it the slow way)

The loss of both FTP and web indicates something unrelated to FTP, passive or otherwise.

Is your server running out of memory and the OOM killer is kicking in and killing both Apache and the FTP server?

Firewall would be my first instinct but nothing in a default Virtualmin install would block a valid authentication…you could check the fail2ban logs, and ask it if you’re banned, of course.

Also, something I’ve come to appreciate is that fail2ban only bans you from the service, not the entire server.

Assuming default setup and fail2ban? Some use CSF which will block you from the server. That used to have some DOS lines available so I guess you could get locked out that way depending on what it sees as an attack I guess…

Not 100% right, it is very easy to set fail2ban to ban the ip from the complete server, without any warning from the webmin ui. So it’s simple to just change the action in a jail to something else, but I think this is off topic

I have disabled FTP and allow only FTPS (port 21) and SFTP (port 22).

One of my resellers recently passed away and I needed to “do an FTP of everything” for the new reseller and noticed a lot of “timeout errors” using FTPS. The download job still completed, but took about 15 mins.

I tried the same download using SFTP… and was shocked that there were NO timeout errors and the job completed in 5 mins.

So… after ALL THESE YEARS of being a proponent for “FTPS”… I am no longer.

EDIT: I was using FileZilla as the FTP client.

Maybe try SFTP and see if you have the same issues?

1 Like