Imunify360 is a comprehensive security solution for server security. With the following commands, Imunify360's web shield, advanced DoS protection, and ModSecurity settings can be configured via the terminal.
1. WebShield Activation
imunify360-agent config update '{"WEBSHIELD": {"enable": true}}'
This command activates the Imunify360 WebShield feature. This layer analyzes bot traffic, blocks malicious requests, and applies browser verification.
2. Enabling Known Proxy Support
imunify360-agent config update '{"WEBSHIELD": {"known_proxies_support": true}}'
This feature ensures that real IP addresses are correctly detected for traffic coming from Cloudflare or similar proxy services.
3. Enabling Enhanced DoS Protection
imunify360-agent config update '{"ENHANCED_DOS":{"enabled":true}}'
This command activates advanced protection against DoS attacks. Abnormal HTTP request counts are detected, and attacker IPs are blocked.
4. Setting DoS Timeframe
imunify360-agent config update '{"ENHANCED_DOS":{"timeframe":60}}'
Determines the monitoring period in seconds. For example, the number of connections made in 60 seconds is measured.
5. Defining DoS Default Limit
imunify360-agent config update '{"ENHANCED_DOS":{"default_limit":100}}'
If the number of requests from the same IP exceeds 100 within the specified time, it is considered an attack, and access is blocked.
6. Updating ModSecurity Rule Set (FULL Mode)
imunify360-agent config update '{"MOD_SEC": {"ruleset": "FULL"}}'
Activates all rules in the ModSecurity security module. This includes OWASP, Imunify custom rules, and commercial protections.
7. Installing Required Dependencies
imunify360-agent install-vendors
Installs additional components required for some Imunify360 protection modules (especially WAF and AV).
Notes:
-
Each time a command is executed, the configuration file is updated, and Imunify360 services are instantly affected.
-
imunify360-agent
commands must be executed with root privileges only. -
After configuration changes, the
/var/log/imunify360
directory can be examined to observe the effects of the firewall, WAF, and browser verification.
With these commands, you can flexibly manage the Imunify360 security level via the terminal and provide proactive defense against attacks.