Knowledge Base

cPGuard CLI Tool

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|DAILYThis option will scan the given path OR scan ALL websites. You can also trigger DAILY and WEEKLY scan
license status | add | renewThis option will help to show license status and add or renew the license key
service stop | start | enable | disableThis option will control automatic scanner daemon
waf enable | disableThis option will help to quickly enable or disable WAF integration
binaryaction email | quarantine | disableThis option will set the action to perform for binary files reported ( recommended is email )
suspaction email | quarantine | disableThis option will set the action to perform for suspicious files reported ( recommended is email )
virusaction email | quarantine | disableThis option will set the action to perform for virus files reported ( recommended is quarantine )
autoclean enable | disableThis option will control automatic file cleanup feature
stopbruteforce enable | disableThis option will control brute-force protection for your web apps
ipcheck enable | disableThis option will control automatic IP reputation checks
srbl enable | disableThis 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|disableThis option will control the weekly server scan scheduler
ipdb stop|start|restart|reload | rebuildManage 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 | disableThis option will control the wp-cron.php patch for all WordPress websites on a server 
brandingThis 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.

Please rate this article to help us improve our Knowledge Base.

0 0