[cPanel] Syncing Rules Configuration Across Servers ?

Hi Guys,

I’m wondering what files I need to sync to clone the configuration across multiple servers and if/what I need to do for the new sync’d config to take effect.

Hi

  • Create backup of CWAF configuration on your main server.
    This can be done with CWAF plugin, menu ‘Configuration’ - ‘Backup Configuration’

  • Copy configuration file /var/cpanel/cwaf/backup.tgz across the servers

  • Restore CWAF configuration on ‘child’ servers
    Menu ‘Configuration’ - ‘Restore Configuration’

Regards, Oleg

Hi Oleg,

Yes, I did notice that, is this something can be run via the command line tool in anyway, I’d love to be able to mass implement / update via SSH echo across servers.

If not, do you think it’s something you guys could see to adding to the command line ?

Hello!

You need to copy these files and directories to other servers:

/var/cpanel/cwaf/etc/httpd/global/*
/var/cpanel/cwaf/etc/userdata/*
/var/cpanel/cwaf/etc/yml/*_exclude.yml
/var/cpanel/cwaf/etc/yml/exclude.yml
/var/cpanel/cwaf/etc/yml/disabled.yml

and restart web-server