I cannot upload files when I enable the firewall

Started by Insan3Us, July 31, 2024, 02:48:05 PM

Previous topic - Next topic

Insan3Us

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!

overseer

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.

Insan3Us

#2
Quote from: overseer 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.

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?

Starburst

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.

Insan3Us

Quote from: Starburst 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.

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...

Insan3Us

I solved the issue.

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

Insan3Us

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.

Starburst

Quote from: Insan3Us on August 01, 2024, 09:14:09 AM
I solved the issue.

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

That is good news.

Curious what was the issue?

Starburst

Quote from: Insan3Us 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.

Nope, only 1 question per thread.  ;D

How are the uploading?

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

Insan3Us

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.


Starburst

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.

Insan3Us

Quote from: Starburst 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.

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

Starburst

If they did that, you could just cut & paste them into /etc/csf/csf.allow.

1 per line