From version 3.28, cPGuard is coming with a CLI utility using which you can manage most of the settings in cPGuard through commands.
How to run CLI?
To manage the options using cPGuard CLI utility, use the following command from the command line.
/etc/cpguard/scripts/cpgbin
Example usage
The generic usage of the command is "/etc/cpguard/scripts/cpgbin <option> <arg1> <arg2>" ...an example is given below
/etc/cpguard/scripts/cpgbin rootkitscan enable
To display the help and usage details, run the command /etc/cpguard/scripts/cpgbin from command line.
Available Commands
scan <scan path>|ALL|WEEKLY|DAILY | This option will scan the given path OR scan ALL websites. You can also trigger DAILY and WEEKLY scan |
license status | add | renew | This option will help to show license status and add or renew the license key |
service stop | start | enable | disable | This option will control automatic scanner daemon |
waf enable | disable | This option will help to quickly enable or disable WAF integration |
binaryaction email | quarantine | disable | This option will set the action to perform for binary files reported ( recommended is email ) |
suspaction email | quarantine | disable | This option will set the action to perform for suspicious files reported ( recommended is email ) |
virusaction email | quarantine | disable | This option will set the action to perform for virus files reported ( recommended is quarantine ) |
autoclean enable | disable | This option will control automatic file cleanup feature |
stopbruteforce enable | disable | This option will control brute-force protection for your web apps |
ipcheck enable | disable | This option will control automatic IP reputation checks |
srbl enable | disable | This option will control SRBL integration with Exim |
virus_autosuspend enable | disable | This option will control the account auto-suspend feature when virus files detect under an account |
domain_autosuspend enable | disable | This option will control the account auto-suspend feature when blacklisted domains detect under an account |
rootkitscan enable | disable | This option will control the daily rootkit scanner scheduler |
weeklyscan enable|disable | This option will control the weekly server scan scheduler |
ipdb stop|start|restart|reload | rebuild | Manage IPDB Firewall |
allowip <IP Address> | Allow an IP address or IP Range to brute-force and IPDB whitelist |
removeip <IP Address> | Remove an IP address or IP Range to brute-force and IPDB whitelist |
allowcountry <IPDB 2 Letter Country Code> | Whitelist a country name in IPDB Firewall |
removecountry <IPDB 2 Letter Country Code> | Remove a country name from IPDB Whitelist |
checkip <IP Address> | Check an IP address against IPDB firewall block list |
wpcron enable | disable | This option will control the wp-cron.php patch for all WordPress websites on a server |
branding | This option will help to brand the user panel plugin |
primaryemail <email address> | This option will set the primary contact email address |
secondemail <email address> | This option will set the secondarycontact email address |
update | This option will check for cPGuard version updates |
version | This option will display the current cPGuard version |
Please feel free to contact our support team if you need any additional details or wish to add anything else to the CLI tool.