How to Setup Comodo on LiteSpeed Web Server with cPanel

Comodo is a Mod_Security rule set created by the Comodo Team. It provides real time protection for web apps running on the LiteSpeed Web Server. Its functions include:

  • Protecting sensitive customer data
  • Meeting PCI compliance requirements
  • Blocking unauthorized access
  • Preventing SQL injection and Cross Site Scripting (XSS) attacks

Install Comodo

  1. Sign up for a Comodo user account here
  2. Install CWAF script
  3. Follow the step-by-step prompts. The installation will detect which web server is running (Apache, LiteSpeed or Nginx)

Configuring Comodo

  1. Login to the WHM control panel, search for comodo from the search bar. You will see the main Comodo WAF plugin dashboard
  2. Click on the Configuration tab and update your CWAF credentials
  3. Click on the Main tab and update rule versions

Once completed, you will notice that the current rules version shows the correct Latest version

Verify Comodo

Method 1

  1. To check CWAF for protection, send the request as shown below:
    http://$server_domain/?a=b AND 1=1

    The server will respond with a 403 status code

Method 2: Command injection attack

  1. Create a delete.php file with following codes
    print("Please specify the name of the file to delete");
    system("rm $file");
  2. Create a dummy file
    touch bob.txt
  3. Open

If WAF works, you will get a 403 forbidden page

Uninstall Comodo

  1. Run the uninstall script
    cd /var/cpanel/cwaf
    bash /var/cpanel/cwaf/scripts/
  2. Answer y

Once completed, Comodo WAF will be gone.

litespeed_wiki/waf/comodo.txt · Last modified: 2018/05/16 19:37 by Eric Leu