Jetserver – The Lazy Admin Blog
Home  /  CentOS  /  Libmodsecurity installation

Libmodsecurity installation

elialum April 14, 2016 1 Comment

Libmodsecurity is one component of the ModSecurity v3 project. Libmodsecurity is a complete rewrite of the ModSecurity platform.

You can find more details about the project here – https://github.com/SpiderLabs/ModSecurity/tree/libmodsecurity

We’ve created a “Copy & Paste” script for installing and testing libmodsec. The was tested under “Centos 7 Minimal”, provided that “Development Tools” was installed (yum group install “Development Tools”).

Install libmodsec –

yum install gcc-c++ flex bison yajl yajl-devel curl-devel curl GeoIP-devel doxygen zlib-devel
cd /opt/
git clone https://github.com/SpiderLabs/ModSecurity
cd ModSecurity
git checkout libmodsecurity
sh build.sh
git submodule init
git submodule update
./configure
yum install ftp://195.220.108.108/linux/fedora/linux/updates/23/x86_64/b/bison-3.0.4-3.fc23.x86_64.rpm
make
make install

Install nginx connector –

# ensure env vars are set
export MODSECURITY_INC="/opt/ModSecurity/headers/"
export MODSECURITY_LIB="/opt/ModSecurity/src/.libs/"
cd /opt/
git clone https://github.com/SpiderLabs/ModSecurity-nginx
cd /opt/ModSecurity-nginx
git checkout experimental
cd /opt
wget http://nginx.org/download/nginx-1.9.2.tar.gz
tar -xvzf nginx-1.9.2.tar.gz
cd /opt/nginx-1.9.2
/bin/cp -f /usr/sbin/nginx /usr/sbin/nginx_original_bkp
./configure --add-module=/opt/ModSecurity-nginx 
make
make install

You can find our script and also many others at the project’s page – https://github.com/SpiderLabs/ModSecurity/wiki/Compilation-recipes

Tags: Libmodsecurity, modsec, modsecurity
Previous Article
Next Article

About Author

elialum

Related Posts

  • Dealing with aggressive bot scanners

    Dealing with aggressive bot scanners

    September 14, 2020

1 Comment

  1. Bruno Reply
    August 8, 2017 at 1:37 am

    Hi,

    I tried, but it did not work. I have Vestacp installed with nginx-1.12.1 centos 7 . Do you have another way? thanks

Leave a Reply

Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search Our Blog

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
Apache
CentOS
CloudLinux
cPanel
ESXI
iSCSI
JetBackup
Litespeed
MySQL
NGINX
Reduxio
SSL
Uncategorized
VMware
Wordpress
XEN

Tags

apache aspx backup CentOS cloudlinux cPanel CXS freetds google htaccess iscsi JetBackup Libmodsecurity litespeed modsec modsecurity mssql MySQL netapp nginx odbc php php.ini phpselector VMFS WHM xenserver

Popular Posts

  • How To Install & Configure a Galera Cluster with MySQL on Centos 7 February 6, 2018
  • Allow a cPanel server to run a VHOST from multiple IP addresses April 3, 2018
  • Libmodsecurity installation April 14, 2016
  • JetBackup Cheat Sheet :: Automatically Acknowledge Alerts November 15, 2018

Recent Posts

  • Dealing with aggressive bot scanners September 14, 2020
  • Litespeed Geo Location Redirect September 14, 2020
  • JetBackup :: Restore on steroids ! August 21, 2020
  • XENSERVER :: CONNECTING ISCSI SR NETAPP STORAGE September 4, 2019

Recent Comments

  • Khan on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Khan on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Oleg Drabkin on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Khan on Allow a cPanel server to run a VHOST from multiple IP addresses
  • Daniel on How To Install & Configure a Galera Cluster with MySQL on Centos 7
אחסון אתרים | JetApps