Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
ModSecurity 2.5

You're reading from  ModSecurity 2.5

Product type Book
Published in Nov 2009
Publisher Packt
ISBN-13 9781847194749
Pages 280 pages
Edition 1st Edition
Languages

Table of Contents (17) Chapters

ModSecurity 2.5
Credits
About the Author
About the Reviewers
1. Preface
1. Installation and Configuration 2. Writing Rules 3. Performance 4. Audit Logging 5. Virtual Patching 6. Blocking Common Attacks 7. Chroot Jails 8. REMO 9. Protecting a Web Application Directives and Variables Regular Expressions Index

Configuration tweaks


Remo's configuration data is contained in the file remo_config.rb in the root directory for the Remo source code (/usr/local/src/remo-0.2.0 in our example). This file can be edited to tweak the Remo configuration. For example, if you want to add a custom data field to the drop-down boxes in Remo, then this is easy to accomplish. Simply find the "standard domains" mapping that looks like this:

# Standard domain to regex mapping
STANDARD_DOMAINS = {
# name - value pairs
"Hostname" => '[0-9a-zA-Z-.]{1,64}',
"IP Address V4" => '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}',
...

and add your own entry to the list. For example, if you wanted a data type for an MD5 sum, you could add the following line to STANDARD_DOMAINS:

"MD5 Sum" => '[0-9a-zA-Z]{32}',

This will add a new data type called MD5 Sum, with a regular expression that allows a 32-character string of digits and letters. Remo also needs to know that this new data type should be displayed in the default drop-down...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}