بالدرس التالي سنقوم بتركيب Mod Security 2 ب 3 أوامر فقط ، لكن يجب ان يكون موديل Mod Security مركب على السيرفر مسبقا ، سنطرح درس لطريقة التثبيت الأكثر سهولة قادما بإذن الله .
أولا نقوم بالدخول لحساب الروت على الSHH .
بعدها نطلق الأولمر التاليا اتباعا
wget -O /root/install_modsec_rules http://403security.org/modsec/install_modsec_rules
sh /root/install_modsec_rules
#RBL Rules
#Include /usr/local/apache/conf/modsec_rules/00_asl_rbl.conf
#Whitelisting Rules
Include /usr/local/apache/conf/modsec_rules/00_asl_whitelist.conf
#Exclusion Rules
Include /usr/local/apache/conf/modsec_rules/05_asl_exclude.conf
#Scan uplaoded files with clamav
Include /usr/local/apache/conf/modsec_rules/05_asl_scanner.conf
#Malware Blacklist Rules
#Include /usr/local/apache/conf/modsec_rules/10_asl_antimalware.conf
#Web Application Protection Rules
#Include /usr/local/apache/conf/modsec_rules/10_asl_rules.conf
#Bad Useragent Signatures
#Include /usr/local/apache/conf/modsec_rules/20_asl_useragents.conf
#Additional Malware Blacklisting Rules
#Include /usr/local/apache/conf/modsec_rules/30_asl_antimalware.conf
#Anti-spam Signatures
#Include /usr/local/apache/conf/modsec_rules/30_asl_antispam.conf
#Enhanced Apache 2.x rules
Include /usr/local/apache/conf/modsec_rules/40_asl_apache2-rules.conf
#Anti Rootkit Signatures
Include /usr/local/apache/conf/modsec_rules/50_asl_rootkits.conf
#”Google Hacks” signatures
Include /usr/local/apache/conf/modsec_rules/60_asl_recons.conf
#Just In Time Patches
Include /usr/local/apache/conf/modsec_rules/99_asl_jitp.conf
#Domain Spam Whitelist
Include /usr/local/apache/conf/modsec_rules/domain-spam-whitelist.conf
#Trusted domains
Include /usr/local/apache/conf/modsec_rules/trusted-domains.conf