Linux serverlinux web serverNETWORK ADMINISTRATIONS

Apache2 ModSecurity Tutorial | Apache2 WAF

In this video, we will take a look at how to secure apache2 with ModSecurity. ModSecurity is a free and open-source web application firewall for apache, it started out as an apache module but has grown into a fully-fledged web application firewall.
It works by inspecting requests sent to the webserver in real-time against a predefined ruleset.
ModSecurity prevents typical web application attacks like XSS, SQL Injection. It does this by actively monitoring and logging requests being sent to the webserver.

Video Documentation: https://www.linode.com/docs/guides/securing-apache2-with-modsecurity/

———————————————————————————–

REGISTER FOR PART 2: https://bit.ly/3fsFPZV
GET $100 IN LINODE CREDIT: https://bit.ly/2PeFnDO

———————————————————————————–

BLOG ►► https://bit.ly/3qjvSjK
FORUM ►► https://bit.ly/39r2kcY
ACADEMY ►► https://bit.ly/39CuORr

———————————————————————————–

TWITTER ►► https://bit.ly/3sNKXfq
INSTAGRAM ►► https://bit.ly/3sP1Syh
LINKEDIN ►► https://bit.ly/360qwlN
PATREON ►► https://bit.ly/365iDLK
MERCHANDISE ►► https://bit.ly/3c2jDEn

———————————————————————————–

CYBERTALK PODCAST ►► https://open.spotify.com/show/6j0RhRiofxkt39AskIpwP7

———————————————————————————–

We hope you enjoyed the video and found value in the content. We value your feedback, If you have any questions or suggestions feel free to post them in the comments section or contact us directly via our social platforms.

———————————————————————————–

Thanks for watching!
Благодарю за просмотр!
Kiitos katsomisesta
Danke fürs Zuschauen!
感谢您观看
Merci d’avoir regardé
Obrigado por assistir
دیکھنے کے لیے شکریہ
देखने के लिए धन्यवाद
Grazie per la visione
Gracias por ver
شكرا للمشاهدة

———————————————————————————–
#WebAppSec#Infosec

source

by HackerSploit

linux http server

35 thoughts on “Apache2 ModSecurity Tutorial | Apache2 WAF

  • Thank you for the great contents you deliver through your channel. You can check if it works from the modsecurity log, it will show the requests that waf blocked or detected and the details of these requests

  • Hello Sir, I have followed the instruction until the time 14:58, and the next step is to restart apache2, when I did this, I got this error "Syntax error on line 43 of /usr/share/modsecurity-crs/rules/REQUEST-922-MULTIPART-ATTACK.conf Error creating rule: Unknown variable: &MULTIPART_PART_HEADERS", can you help me, how can I solve it? thanks in advance

  • Having an error here sir:

    systemctl restart apache2 (after all the configurations) returns an error. after inspecting, I found out using the journalctl that the webserver will refuse to start with an Unknown variable: &MULTIPART_PART_HEADERS error. I temporarily deleted the file rules/REQUEST-922-MULTIPART-ATTACK.conf as a workaround.
    Apache now starts normally, but I am wary because now the rules are incomplete.
    modsecurity2 version is 2.9.5 (I followed your commands in this video).
    Has anyone found a solution to this?

    Anyway sir, your tutorials are great, as always! Learned a lot. 🙂

  • in "/etc/modsecurity/modsecurity.conf" SecStatusEngine is set to "On" curiously I get this error in apache2 log:
    "ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On"

  • Can we create apache on different machine and modsecurity on another machine ?

  • great tutorial, i setup modsec to implement as a solution for a vulnerable web app and makes everything secure by just deploying the WAF, i have seen a lot of your videos and you teach quality tools for security!! keep up the good work!!

  • i have a reverse proxy with nginx if someone access my apache site through nginx reverse proxy which is normal but does somebody actually have to access the apache2 site directly for modsecurity to work or people can still access nginx reverse proxy to my site(apache2) and will modsecurity still work. thanks.

  • Any help matey?

    May 24 17:08:27 cn01-desktop systemd[1]: Starting The Apache HTTP Server…
    May 24 17:08:28 cn01-desktop apachectl[286847]: apache2: Syntax error on line 231 of /etc/apache2/apache2.conf: Syntax error on line 36 of /etc/apache2/sites-enabled/000-default.conf: </VirtualHost> without matching <VirtualHost> section
    May 24 17:08:28 cn01-desktop apachectl[286844]: Action 'start' failed.
    May 24 17:08:28 cn01-desktop apachectl[286844]: The Apache error log may have more information.
    May 24 17:08:28 cn01-desktop systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    May 24 17:08:28 cn01-desktop systemd[1]: apache2.service: Failed with result 'exit-code'.
    May 24 17:08:28 cn01-desktop systemd[1]: Failed to start The Apache HTTP Server.

  • What if I do not have phpmyadmin, where to add config then?

    Thank you

  • Can this block an automated sqlmap injection running from Kali machine?

  • Hello Alexis. Thank you for the high-quality content of your videos. I implemented the mentioned Security Mode using those rules from the CoreRulesSet but I am having one issue with WordPress. The site continues to work well but if I log in and try to make any change or any post or page it blocks. Is there any exception rule or a specific set of rules for WordPress? Thank you!

Comments are closed.