Synchronizing directories that contain feeds (DMZ scenario)

April 11, 2024

ID 268349

For synchronizing feeds on both the local and DMZ hosts, you can use the RSync utility.

If the DMZ host is a Windows computer, the RSync utility can be run by using Cygwin. See how to install Cygwin in section "Separate installation of Kaspersky CyberTrace Service and Feed Utility (Windows)".

To configure synchronization on the DMZ host:

  1. On the DMZ host, configure the OpenSSH components as follows:
    1. Run the following command as root:

      ssh-host-config

      You can answer "Yes" every time. The main point is to run the sshd daemon as a service.

    2. Run the following command:

      net start sshd

The sshd daemon will start automatically.

To configure synchronization on the local host:

  1. Create a private key and a corresponding public key.

    For this purpose, run the following command on the local host:

    ssh-keygen -t rsa -q -N '' -f /home/<user>/.ssh/dmz_rsa_key

    Specify the user login instead of <user>. The keys will be created without a password.

  2. Copy the public key from the local host to the DMZ host by running the following command:

    ssh-copy-id -i /home/<user>/.ssh/dmz_rsa_key <DMZ_user>@<DMZ_host>

    When you run this command, you will be asked for the password to <DMZ_user>@<DMZ_host>.

  3. Test the synchronization of the contents of directories that contain feeds by running the following command on the local host:

    rsync -a --delete-before --delay-updates -e "ssh -i /home/<user>/.ssh/dmz_rsa_key" <DMZ_user>@<DMZ_host>:/<Path_to_feeds>/ /<Path_to_feeds_on_Local>/

    In this command, <Path_to_feeds_on_Local> is the path to the directory containing feeds on the local host (namely, %service_dir%/feeds), and <Path_to_feeds> is the path to the directory on which updated feeds are stored on the DMZ host.

    To pass the synchronization test, the contents of the <Path_to_feeds_on_Local> directory on the local host must be the same as the contents of the <Path_to_feeds> directory on the DMZ host.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.