Author Topic: I cannot upload files when I enable the firewall  (Read 421 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
I cannot upload files when I enable the firewall
« on: July 31, 2024, 02:48:05 PM »
Hi Guys,

I searched this on the entire internet and still couldn't find a solution.
So, I have this script installed : https://codecanyon.net/item/playtube-the-ultimate-php-video-sharing-platform/20759294
I put my IP address on the white list but when I try to upload a video doesn't allow me.
I don't have any log errors or something, and this happen only when I enable the firewall, worked first time when I installed but after I reboot the server doesn't let me anymore.
If I can see in another log, please tell me where to look.
I use Almalinux 9.

I really need help as I want to open a business.

Thank you a lot!
« Last Edit: July 31, 2024, 02:49:38 PM by Insan3Us »

Offline
*****
Re: I cannot upload files when I enable the firewall
« Reply #1 on: August 01, 2024, 02:47:14 AM »
Are you running Mod Security? If so, what ruleset are you running? Comodo ruleset will give less false positives, but requires a paid CWP Pro license.

Offline
*
Re: I cannot upload files when I enable the firewall
« Reply #2 on: August 01, 2024, 06:33:29 AM »
Are you running Mod Security? If so, what ruleset are you running? Comodo ruleset will give less false positives, but requires a paid CWP Pro license.

I'm using the Comodo default rules: https://ibb.co/MGFyzC8
I have the paid version: https://ibb.co/7KkZ62r

It worked to upload stuff but till I reboot the system, so is something that changed after booting. Like ffmpeg doesn work, because when I upload a video, is processing the video and after I fill the name, description, choose the thumbnail, etc...and press upload stuck there, the page not reload or nothing just froze there.
And also I have in mysql conf the sql-mode = '' desactivated because ffmpeg will not work otherwise...so is a change when I activate the firewall to activate somehow the sql-mode? and also the ffmpeg to not work? But how I check?
« Last Edit: August 01, 2024, 06:38:08 AM by Insan3Us »

Offline
*****
Re: I cannot upload files when I enable the firewall
« Reply #3 on: August 01, 2024, 08:06:23 AM »
What is the file size you are trying to upload?

How are you trying to upload?
via FileManager or FTP?

Listing your IP in the CSF whitelist takes care of CSF only, so it's not being blocked there.

Comodo does have a new ruleset 1.241
You can try to uninstall ModSecurity temporarily.

Offline
*
Re: I cannot upload files when I enable the firewall
« Reply #4 on: August 01, 2024, 09:10:27 AM »
What is the file size you are trying to upload?

How are you trying to upload?
via FileManager or FTP?

Listing your IP in the CSF whitelist takes care of CSF only, so it's not being blocked there.

Comodo does have a new ruleset 1.241
You can try to uninstall ModSecurity temporarily.

I desactivated the ModSecurity and is the same.
I upload videos via FileManager and is and doesn't matter the size, I tried 300 MB, 500 MB, 2GB .. and the same.

I don't know what to do more...

Offline
*
Re: I cannot upload files when I enable the firewall
« Reply #5 on: August 01, 2024, 09:14:09 AM »
I solved the issue.

Thank you all for all your support! I much appreciate.

Offline
*
Re: I cannot upload files when I enable the firewall
« Reply #6 on: August 01, 2024, 11:12:10 AM »
I have another questions if someone can help me with that:

I can upload videos only if my IP is on the white list, good.
But what I should do with the other visitators/registered users on my website that want to upload videos by their own?
How I could set the restrictions as people to be able to upload videos without being added to white list ?

Would be great if someone know this.

Offline
*****
Re: I cannot upload files when I enable the firewall
« Reply #7 on: August 01, 2024, 12:11:17 PM »
I solved the issue.

Thank you all for all your support! I much appreciate.

That is good news.

Curious what was the issue?

Offline
*****
Re: I cannot upload files when I enable the firewall
« Reply #8 on: August 01, 2024, 12:13:11 PM »
I have another questions if someone can help me with that:

I can upload videos only if my IP is on the white list, good.
But what I should do with the other visitators/registered users on my website that want to upload videos by their own?
How I could set the restrictions as people to be able to upload videos without being added to white list ?

Would be great if someone know this.

Nope, only 1 question per thread.  ;D

How are the uploading?

If by FTP, by default CWP has it pretty well locked down.

Offline
*
Re: I cannot upload files when I enable the firewall
« Reply #9 on: August 01, 2024, 01:25:12 PM »
Fair  ;D

The problem was that I use a cloud through FTP to storage the videos, I don't store them in my VPS, so all the 400 IP's that the cloud firm have for their server I had to put them in the white list.
Otherwise the videos couldn't be uploaded.


Offline
*****
Re: I cannot upload files when I enable the firewall
« Reply #10 on: August 01, 2024, 01:32:10 PM »
Maybe lookup the IP allocation, and you can just whitelist that.

You can use https://myip.ms/

Enter 1 IP, and it will give you that IP upstream block (e.g. /24, /16, etc.)

As long as they don't have IP scattered, that should be the easiest way.

Offline
*
Re: I cannot upload files when I enable the firewall
« Reply #11 on: August 01, 2024, 02:13:14 PM »
Maybe lookup the IP allocation, and you can just whitelist that.

You can use https://myip.ms/

Enter 1 IP, and it will give you that IP upstream block (e.g. /24, /16, etc.)

As long as they don't have IP scattered, that should be the easiest way.

I managed because they gave me a list of all the IPs

Offline
*****
Re: I cannot upload files when I enable the firewall
« Reply #12 on: August 01, 2024, 03:09:05 PM »
If they did that, you could just cut & paste them into /etc/csf/csf.allow.

1 per line