Saturday, February 4, 2023
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory
  • Login
  • Register
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
No Result
View All Result

Home > Linux > What is ModSecurity and how to use it?

What is ModSecurity and how to use it?


Erdem Yasar Erdem Yasar
September 6, 2019
3 min read
mod-security-featured

The Internet keeps growing continuously, and that brings new vulnerabilities and flaws against attacks every day. Thus, the implementation of security plugins like ModSecurity became very important. ModSecurity, also known as ModSec, is an open-source web application firewall (WAF). Considering most of the attacks made over the web application level, ModSecurity is a handy tool to secure the server and the data.

Table of Contents

  • ModSecurity Core Rule Set
  • Monitoring ModSecurity rules
  • How to enable ModSecurity in cPanel
  • How to Install ModSecurity on your server?
    • Ubuntu
    • CentOS
    • Debian

ModSecurity Core Rule Set

ModSecurity was developed and released by Ivan Ristić in 2002. The main purpose of the first version of ModSecurity was to monitor application traffic on the Apache HTTP Server. As a result of that, porting ModSecurity to other platforms required a lot of time, and maintenance costs were high. So a new process started to rewrite ModSecurity in 2015 entirely. In this new version, ModSecurity is separated into a standalone engine that can communicate with the server with an API. This latest version is called ModSecurity 3.0 and can support connectors for NGINX, IIS, and Apache.

ModSecurity works as a real-time filter against incoming attacks to web applications. ModSecurity comes with a Core Rule Set (CRS) but also supports a flexible rule engine to handle more complicated tasks. OWASP ModSecurity Core Rule Set is the most popular free ruleset and updated regularly, which can block multiple generic attacks such as cross-website scripting, lousy user agents, SQL injection, trojans, session hijacking, and some other exploits.

Monitoring ModSecurity rules

ModSecurity working principle depends on scanning and testing all the requests coming to the server. If the request passes the tests, it is directed to the website; if not, request will be blocked. During this process, ModSecurity gives you access to real-time monitoring and inspection of the traffic. Instead of scheduled security measures, ModSecurity serves as a continuous security assessment that helps you hardening web applications. ModSecurity can also log the traffic for further inspection in case of a data breach.

Although ModSecurity comes with handy rule sets, there may be false-positive limitations. As an administrator, you should keep an eye on the traffic, monitor the blocked traffic to check if they are legitimate traffic or not. Also ensure the ruleset is up to date, so ModSecurity can detect and block the latest malicious web attacks.

How to enable ModSecurity in cPanel

You can enable and use ModSecurity with a few simple clicks on cPanel. For enabling ModSecurity in your cPanel interface, follow the steps below:

1. Login to your cPanel account.

cpanel-modsecurity-login
2. Scroll to the ‘Security’ section.

cpanel-modsecurity

3. Click the ‘ModSecurity icon. The list of all domains is listed.

cpanel-modsecurity

4. Check whether ModSecurity is Enabled or not.

5. If ModSecurity is disabled, simply click the ‘Enable’ button.

6. A message, which informs ModSecurity is enabled is displayed.

How to Install ModSecurity on your server?

You even can install ModSecurity directly to your VPS. Before installing ModSecurity, you need to have Apache installed.

Ubuntu

Install ModSecurity on your Ubuntu VPS

sudo apt-get install libapache2-mod-security2

Restart Apache

/etc/init.d/apache2 restart

Check the version of ModSecurity

apt-cache show libapache2-mod-security2

CentOS

Install ModSecurity on your CentOS VPS

yum install mod_security

Restart Apache

/etc/init.d/httpd restart

Check the version of ModSecurity

yum info mod_security

Debian

Install ModSecurity on your Debian VPS

sudo apt install libapache2-modsecurity

Restart Apache

/etc/init.d/apache2 restart

Check the version of ModSecurity

apt-cache show libapache2-modsecurity

See more Linux News


Tags: ModSecurity
Erdem Yasar

Erdem Yasar

Erdem Yasar is a news editor at Cloud7 News. Erdem started his career by writing video game reviews in 2007 for PC World magazine while he was studying computer engineering. In the following years, he focused on software development with various programming languages. After his graduation, he continued to work as an editor for several major tech-related websites and magazines. During the 2010s, Erdem Yasar shifted his focus to cloud computing, hosting, and data centers as they were becoming more popular topics in the tech industry. Erdem Yasar also worked with various industry-leading tech companies as a content creator by writing blog posts and other articles. Prior to his role at Cloud7 News, Erdem was the managing editor of T3 Magazine.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

Next Post
linux-security

7 ways of staying secure on Linux

Related News

LockBit encryptor source code is updated

LockBit encryptor source code is updated

February 3, 2023 4:40 pm
Fortinet is expanding its SOC offerings portfolio

Fortinet is expanding its SOC offerings portfolio

February 3, 2023 2:00 pm
Radware announces a new partner program

Radware announces a new partner program

February 3, 2023 1:30 pm
The Ultimate Distro-Blend blendOS arrives

The ultimate distro-blend blendOS arrives

February 2, 2023 4:00 pm
Get free daily newsletters from Cloud7 News Get the Cloud7 Newsletter
Select list(s):

Check your inbox or spam folder to confirm your subscription.

By subscribing, you agree to our
Copyright Policy and Privacy Policy

Get the free newsletter

Subscribe to receive the latest IT business updates straight to your inbox.

Select list(s):

Check your inbox or spam folder to confirm your subscription.

Editor's Choice

What’s new in Linux kernel 6.2 rc6?

10 Best Web Hosting Services of 2023

Ubuntu 22.04 LTS is available for download. What is new?

CERN and Fermilab recommend AlmaLinux

7 best hosting control panels of 2023

How to update Linux Kernel without rebooting?

7 best Linux mail servers of 2023

7 best cPanel alternatives for 2023

7 best Linux web browsers for 2023

7 best CentOS alternatives

7 best Linux server distros of 2023

Interview with Igor Seletskiy on AlmaLinux

How to create a VM on VMware Workstation

Recent News

  • LockBit encryptor source code is updated
  • LibreOffice 7.5 Community is released. What’s new?
  • NTT to add Palo Alto Networks’ solution to its portfolio
  • Gcore announces partnership with Super Protocol
  • Fortinet is expanding its SOC offerings portfolio

Cloud7 News
Cloud7 is a news source that publishes the latest news, reviews, comparisons, opinions, and exclusive interviews to help tech users of high-experience levels in the IT industry.

EXPLORE

  • Web Hosting
  • Cloud Computing
  • Data Center
  • Cybersecurity
  • Linux
  • Network/Internet
  • Software
  • Hardware
  • How-Tos
  • Troubleshooting

RESOURCES

  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

Get the Cloud7 Newsletter

Get FREE daily newsletters from Cloud7 delivering the latest news and reviews.

  • About
  • Privacy & Policy
  • Copyright Policy
  • Contact

© 2023, Cloud7 News. All rights reserved.

No Result
View All Result
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

© 2023, Cloud7 News. All rights reserved.

Welcome Back!

Sign In with Facebook
Sign In with Google
Sign In with Linked In
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Facebook
Sign Up with Google
Sign Up with Linked In
OR

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.