disable/enable a modsecurity rule thru ssh

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @niceboy,

I recommend using the following WHM API 1 functions if you want to edit or remove a rule via the command line:

WHM API 1 Functions - modsec_edit_rule - Developer Documentation - cPanel Documentation
WHM API 1 Functions - modsec_remove_rule - Developer Documentation - cPanel Documentation

Command line examples are available under the "Examples" section. You can review all Mod_Security WHM API 1 functions at:

WHM API 1 Sections - ModSecurity - Developer Documentation - cPanel Documentation

Thank you.