How to block IP automatically if number of requests exceed via WHM Cpanel - cpanel

How to block IP automatically if number of requests exceed via WHM cPanel. I tried but did not found way. As we have lots of domain hosted, so we can not use Cloud flare.
Please suggest the way with cPanel WHM.

You can do the following in that case:
Install ConfigSecurity and Firewall and limit number of requests using PORTFLOOD directive in csf config. This setting will limit requests for the whole server.
Install Litespeed Webserver and edit per client throttle. This setting will limit request per domain hosted.

Related

How to limit multiple requests from same IP? (Centos + APACHE)

I run wiki like database website. Some people crawl (scrape) my website data regularly.
So I am trying to block these crawlers.
Is there a script to prevent after certain number of requests from same IP address?
Yes, there are modules like mod_security and mod_evasive in apache to prevent these kind of attack like scraping and DDOS.
You just need to install and configure it as you need for your server.
Check this link for apache and CentOS configuration.

1 Server Multi cPanel, how the apache work?

i want to ask something about dedicated server.
i have dedicated server and a cPanel website with heavy load, when i check the server load, all parameter didn't go up to 60% usage. but the apache work is high.
so i wonder if i can do this.
i buy dedicated server(DS) and install 2 cPanel on same DS. i know that cPanel need an IP to bind the license so i add 1 additional IP to my DS.
what i am trying to archieve here is to split workload in same website, and to split the traffic i use loadbalancer from CF.
so i have abc.com with 2 different IPs and use LoadBalancer to split the load.
here is why i need to do this
Server load relative low (under 80%)
Apache load relative high 3-10 req/s
There is a problem in your problem definition
What do you mean by Apache work?
if you want have more threads and processes of Apache httpd on the same server, you dont need to install two Cpanel instances, you could tune your Apache httpd worker configuration for a better performance and resource utilization.
you can even use litespeed or nginx web servers on cpanel.

How do I send requests for a specific domain to Apache without it serving that domain yet?

I have an AWS EC2 server that hosts 3 domains with Apache 2. This server sits behind an AWS ELB load balancer which sends it requests. If I want to update this server, instead of taking the server down, I can create a new identical EC2 server and install all the software using the same scripts that built the first server and when it is ready I can add the new server to the ELB and then remove the old server. This gives me zero downtime which is great.
But before I remove the old server how do test the new server to prove everything is working and it is serving those 3 domains? DNS points to the ELB for these domains, the ELB sendsthe requests to the server, and the Apache install on the server routes the traffic to the appropriate site depending on what subdomain was requested. Is there a way make a request to the new server via IP address since that is the only way to address it before it is behind the ELB but tell it I want to make a request to a specific subdomain? If not how else can I prove all 3 sites are running and working properly without just adding it to the ELB, removing the old server, and crossing my fingers?
P.S. Sorry for the poor title. Please edit it if you can think of a better one that better represents what I am asking.
Use ELB healthcheck to perform the check. I recommend you to enable Apache server status mod. Use health check against /server-status and if it returns 200 for certain period of time, ELB will mark the instance as active and healthy.

How to change the Main IP of a dedicated Centos. cPanel Server?

I have a cPanel server and it is using the main IP.
I got it from Online.net, now my main concern is how to change the IP of the server with a failover IP?
There is a DDoS attack on the main IP, and i want to turn it off completely and use a failover IP instead, all the DDoS attack on that IP, should be auto dropped as that ip won't be used.
How to do it?
Thank You.
PS: I have already started using Cloudflare, that's why i want to change the IP to prevent the DDoS.
Its very simple just follow methods:
WHM => Basic cPanel & WHM Setup => Basic Config
Check below screenshot:
And finally Save changes.
To secure from DDOS use Use CSF Firewall and use Comodo ModSecurity Apache Rule to protect your websites from hackers

Apache Virtual Host settings with hostnames

I am using apache as my front http server which handles requests for JBoss 4.2.2 running as an application server.I have a J2EE application running on JBoss handles mutliple sites requests.
My IP is registered to xyz.com
a request to community1.xyz.com loads site for community1
a request to community2.xyz.com loads site for community2
I have single virtual host configured which listens to default (all requests) in ssl.conf
I need two different SSL certificates to be used for community1 and community2
How can configure 2 Virtual Hosts to with respect to the dns name to do so.
The reason I need to different SSL instead of 1 assigned to *.xyz.com is for the fact that
community2.xyz.com is being redirected from another server mmm.com to my Apache server.
If you want to use two different certificates for the same IP address, you're going to have to use the Server Name Indication (SNI) extension, which is relatively recent (and might not be supported by all browsers, but it seems to work with recent ones).
You'll find more details about the configuration of the Apache Httpd front-end on this Apache wiki page:
http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI
While you can use Server Name Indication (SNI), I would recommend simply getting another IP address because it is not fully supported (people with older browsers wouldn't be able to go to your site).