How To Install mod_security/mod_security2 On SuSE Linux Enterprise Server 10 (SLES10)
|
Submitted by Elconas (Contact Author) (Forums) on Fri, 2008-04-18 08:38. :: SuSE | Apache | Security
How To Install mod_security/mod_security2 On SuSE Linux Enterprise Server 10 (SLES10)IntroductionThe Apache module mod_security is a very powerful security module. Combined with predefined rules, you can close many security wholes on your server, opened by bad written php or perl apps. Unfortunately mod_security is not part of the SLES10 distribution. To install mod_security to have to install some 3rd party modules. This guide helps you to install mod_security on SLES10. It also helps you to remove the module, by building RPM packages you can easily uninstall. Install Apache2First of all you have to install apache2. This is very simple with the following command. yast2 -i apache2 Install requried build packagesSome modules are required to build the mod_security module. Install the following packages: yast2 -i libxml2-devel pcre-devel apache2-devel curl-devel gcc gcc-c++ Apache2-devel is required for apxs2. curl-devel is optional. Get and Install checkinstall (for packaging)To keep track of installed software and enable the user to uninstall and update software, checkinstall can build RPM, DEBIAN (DEB) and Slackware packages. Instead of executing "make install" just run "checkinstall" and checkinstall catches all files, that would be installed by "make install". Get checkinstall from http://www.asic-linux.com.mx/~izto/checkinstall/download.php. wget http://www.asic-linux.com.mx/~izto/checkinstall/files/source/checkinstall-1.6.1.tgz Get and Install libluaThe LUA programming language is used by mod_security for configuration. You must compile LUA as shared module. Get LUA from http://www.lua.org/ftp/lua-5.1.3.tar.gz. wget http://www.lua.org/ftp/lua-5.1.3.tar.gz [...] cp /usr/src/packages/RPMS/i386/lua-5.1.3-1.i386.rpm .. Now you have to build a shared library from the liblua archive. cd /usr/local/lib Get and Install mod_securityGet mod_security from http://www.modsecurity.org/download/direct.html. Documentation about the installation can be found here: http://www.modsecurity.org/documentation/index.html. cd modsecurity-apache_2.5.2 ... cp /usr/src/packages/RPMS/i386/apache2-mod_security-2.5.2-1.i386.rpm ../../ Configure Apache2 for mod_security# /etc/apache2/conf.d/mod_security.conf
Extract and Configure Core RulesGet the core rules from http://www.modsecurity.org/download/modsecurity-core-rules_2.5-1.6.0.tar.gz. cd /etc/apache2 Modify modsecurity_crs_10_config.conf to meet the location of your config files: vi modsecurity_crs_10_config.conf Restart Apache and Test your WebpageFirst restart apache to get the current configuration: rcapache restart To test the installation, write a simple (insecure) PHP script like this: <?
# /srv/www/htdoc/index.php Then access it to try opening insecure files: http://ip.of.your.server.de/index.php?file=/etc/passwd You should get ERROR 501 in your browser and the SecAuditLog file should show: [...] Caveats
Links and References
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com
Red Hat Virtual Experience - a free virtual event. Dec. 9th







Recent comments
4 hours 37 min ago
10 hours 25 min ago
12 hours 16 min ago
14 hours 1 min ago
17 hours 52 min ago
23 hours 36 min ago
23 hours 47 min ago
1 day 4 hours ago
1 day 9 hours ago
1 day 14 hours ago