{"id":58585,"date":"2020-12-08T10:53:09","date_gmt":"2020-12-08T16:53:09","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=58585"},"modified":"2020-12-08T10:53:09","modified_gmt":"2020-12-08T16:53:09","slug":"how-to-install-and-configure-modsecurity-in-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/how-to-install-and-configure-modsecurity-in-cpanel\/","title":{"rendered":"How To Install and Configure ModSecurity™ In cPanel"},"content":{"rendered":"\n
Automated attack bots bombard web apps with malicious requests as soon they go online. Attackers target every website and ecommerce store eventually, hoping to find a vulnerability they can exploit to inject code, misuse resources, or steal data. In 2019, bad bots generated a quarter of all web traffic<\/a>. cPanel & WHM includes many features that help web hosts and site administrators to repel bad bots, including the ModSecurity web application firewall (WAF).<\/p>\n\n\n\n cPanel & WHM has supported ModSecurity 2 for many years, and in cPanel 92, we introduced support for ModSecurity 3. It should be emphasized that ModSecurity 3 support is experimental, but it offers a couple of significant advantages:<\/p>\n\n\n\n In this article, we\u2019re going to look at what ModSecurity does and how you can install and configure ModSecurity 3 on cPanel & WHM.<\/p>\n\n\n\n ModSecurity is a web application firewall. It monitors incoming web traffic for threats in real-time, blocking malicious connections before they reach applications. ModSecurity is a rule-based firewall; it compares requests to a list of rules, looking for patterns that match attacks such as SQL injection, session hijacking, cross-site scripting, and more.<\/p>\n\n\n\n Rules are typically provided as a rule set created by a third party, although users can add their own. The Open Web Application Security Project\u00ae (OWASP) Core Rule Set<\/a> is the most widely used. It includes rules that protect web apps against a wide range of threats, including the OWASP Top Ten<\/a>, a regularly updated list of the most common attacks.<\/p>\n\n\n\n You may be wondering how web-application firewalls differ from the network firewall your server already has. Do you need both? Network firewalls protect servers from malicious traffic at the network layer, as discussed in \u200c<\/em>How To Survive a DDoS Attack<\/em><\/a>,<\/em> which explains how to install and configure the Config Server Security Firewall (CSF) with cPanel & WHM.<\/p>\n\n\n\n Network firewalls like CSF can\u2019t filter attacks against web applications because they look like legitimate web requests. In contrast, WAFs are specialized to work at the application layer, identifying potentially harmful HTTP requests. If you host web apps on your cPanel server, it\u2019s a good idea to use both a network firewall like CSF and a WAF like ModSecurity.<\/p>\n\n\n\nWhat Is Apache ModSecurity and How Does It Work?<\/strong><\/h2>\n\n\n\n
How to Install ModSecurity in cPanel<\/strong><\/h2>\n\n\n\n