Skip to content

Instantly share code, notes, and snippets.

@wiesty
Created April 10, 2024 11:11
Show Gist options
  • Select an option

  • Save wiesty/cc0d5784587f7105e00cbf4c39851817 to your computer and use it in GitHub Desktop.

Select an option

Save wiesty/cc0d5784587f7105e00cbf4c39851817 to your computer and use it in GitHub Desktop.
Unban/Whitelist IP from mod security web application firewall ban
SecRule REMOTE_ADDR `@ipMatch 127.0.0.1` `id:3;phase:1;t:none;log;pass;ctl:ruleRemoveById=55666`
Range would be
SecRule REMOTE_ADDR `@ipMatch 127.0.0.1/24` `id:3;phase:1;t:none;log;pass;ctl:ruleRemoveById=55666`
both combined
SecRule REMOTE_ADDR `@ipMatch 127.0.0.1/24;127.0.0.1` `id:3;phase:1;t:none;log;pass;ctl:ruleRemoveById=55666`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment