

                   Doctor Web, Ltd.

             Dr.Web(R) Agent for Linux
                Administrator Manual

                   Version 6.0.2

====================================================================
All the materials published herein are the property of Doctor Web, Ltd.
and may not be reproduced in any form without written permission of
Doctor Web, Ltd. and proper attribution.

Dr.Web is a registered trademark of Doctor Web, Ltd.

Other product names mentioned herein are trademarks or registered
trademarks of their respective companies.

There might be further improvements and changes in the software not
described in this manual. The revised and amended versions of
this manual are available at www.drweb.com.
====================================================================

(C) 1992-2014 "Doctor Web".
Russia, Moscow - Saint Petersburg
http://www.drweb.com/

Dr.Web Control Agent module ("Agent" hereafter) is a memory resident module.
It is used to manage settings of various modules of "Dr.Web Antivirus for Unix
systems" software complex. When separate modules of the software complex
are launched, or settings of the whole complex are changed, Agent sends to
these modules all necessary configuration information.
Depending on the current license limitations Agent can define and manage
antivirus policies.

Key features of Dr.Web Unix Control Agent operation

Dr.Web Control Agent can operate in two modes: Standalone and Enterprise.
When "Dr.Web Antivirus for Unix systems" is integrated with Dr.Web Enterprise
Suite ("ES" hereafter), Agent can work in Enterprise mode. In this mode Agent
connects to ES-server and receives lisence key files and settings of antivirus
modules. Agent itself is controlled via ES server from antivirus console.

Note that this version of Dr.Web Control Agent operates only with ES server
version 10!

To run Agent in Enterprise mode, you must set up correctly all the parameters
from [EnterpriseMode] section of the Agent 's configuration file.

If Dr.Web Antivirus is used on a workstation not included in ES antivirus
network, then Agent works in Standalone mode. In this mode configuration files
and license key files reside on local drives, and Agent can be controlled
directly from this computer.

Dr.Web Control Agent can interact with Dr.Web Unix Monitor by exchanging
control signals. 

Startup of Dr.Web Unix Control Agent

When Agent starts with default settings, the following actions are
performed:
1. Agent searches and loads its configuration file. If the configuration
   file is not found, Agent terminates.
2. If the parameters in the [EnterpriseMode] section are
   set correctly and Dr.Web for UNIX mail servers solution is operating
   within anti-virus network, then Agent starts in enterprise mode.
   Otherwise, if parameters in the [Standalone] section are set correctly,
   Agent starts in the standalone mode. If the parameters in the [Standalone]
   section are not set, Agent terminates.
3. Socket for interaction of Agent with other Dr.Web modules is created.
   If a TCP socket is used, then there can be several connections (loading
   continues if at least one connection is established). If a UNIX socket
   is used, it can only be created if the user, whose privileges are used
   to run drweb-agent, has read and write access to its directory. If socket
   cannot be created, Agent terminates. Further loading process depends on
   the selected operation mode.

If Agent operates in enterprise mode:
1. Agent connects to Dr.Web ESS. If Dr.Web ESS is unavailable or authorization
   process fails during first time connection, Agent terminates. If Agent had
   worked previously with this server, but it's temporary unavailable (for
   example, in the event of connection problems), Agent use backup copies
   of configuration files received from the server earlier.
2. If connection is established, Agent receives key files and settings from
   Dr.Web ESS. After all setting and key files arereceived, Agent is ready
   for work.

If Agent operates in the standalone mode:
-  Metaconfiguration files that define Agent interaction with other Dr.Web
   modules are loaded. Location of meta-configuration files is set in the
   MetaConfigDir parameter in the [Agent] section of the Agent configuration
   file. When meta-configuration files are successfully loaded, Agent is ready
   for work.

Key features for interaction with ES Server version 10:

ES Server version 10 does not support management of Dr.Web Monitor and
Dr.Web Daemon. So, drweb-agent10 uses two supplementary configuration files:
es_monitor.conf and es_daemon.conf.
These files store configuration for Dr.Web Monitor and Dr.Web Daemon. The
configuration settings will be used for adjusting operation of these modules in
enterprise mode.
Each file line contains the parameter value of the corresponding module
configuration. The format is as follows: <section>/<parameter> <value>, where
<section> is the name of the section from the component configuration file,
<parameter> is the parameter name, and <value> is the value specified for this
parameter.

Example (for es_monitor.conf file that contains settings for Dr.Web Monitor
component operation in enterprise mode):
 Monitor/RunAppList DAEMON
This line contains the value of RunAppList parameter stored in [Monitor] section
in Dr.Web Monitor configuration file. This parameter value is used when the
suite is running in enterprise mode. In this case, Dr.Web Monitor starts only
Dr.Web Daemon.

Example (for es_daemon.conf file that contains settings for Dr.Web Daemon
component operation in enterprise mode):
 Daemon/MaxCompressionRatio 500
This line contains the value of MaxCompressionRatio parameter stored in [Daemon]
section in Dr.Web Daemon configuration file. This parameter value is used when
the suite is running in enterprise mode. In this case, Dr.Web Daemon uses 500
as the threshold value of compression ratio.

In the es_monitor.conf file, you must specify only the Monitor/RunAppList
parameter.
In the es_daemion.conf file, you can change value for any parameter, but you
cannot delete or add any parameter.

Dr.Web Agent Command Line Parameters

As every UNIX program Dr.Web Agent supports command line parameters.
They are separated from specified path by white space and are prefixed by
hyphen ("-") symbol. To get complete list of parameters, launch Agent
with -h or --help parameters.

Dr.Web Agent has the following startup parameters
   
   $ drweb-agent10 [-parameters]

Agent supports the following command line parameters:

  -h [ --help ] - outputs information on command line parameters;
  -v [ --version ] - outputs information on current Agent version;
  -u [ --update ] - updating mode;
  -f [ --update-failed ] - updates modules that failed to update in standard mode;
  -C [ --check-only ] - checks module configuration;
  -p [ --newpwd ] - changes username and password to access Enterprise Server;
  -d [ --droppwd ] - discards Dr.Web Enterptise Server registration (user name
     and password) to perform workstation registration on Enterprise Server
	 all over again;
  -c [ --conf ] arg (=/etc/drweb/agent.conf)- specifies path to
     alternative configuration file;
  -s [ --socket ] arg - specifies alternative socket address;
  -P [ --pid-file ] arg - specifies path to PID-file;
  -e [ --export-config ] arg - exports configuration of application specified 
     in argument to Enterprise Server. The argument is the name of the application
	 specified in the header of Application "application name" section of
	 corresponding amc file.
	 This command line parameter cannot be used when the Agent is running.
	 Also this parameter cannot be used to export configuration of Dr.Web
	 Antivirus for Linux to Enterprise Server.

Description of the amc-file:

AMC acronym means Agent Meta-Configuration File. amc-files are included in packages
of those products which can interact with Agent. In these files components'
configuration and parameters, which values are received from Agent, are described.
By default, amc files are located in /etc/drweb/agent, path to which is
specified by MetaConfigDir parameter in the [Agent] section of
/etc/drweb/agent.conf configuration file.

Description of each component can be found in "Application" section named
after this component. At the end of the section "EndApplication" must be
specified.

The following parameters must be present in the description of the component:

- id: identifier of the component in ES Server.

- ConfFile: path to the configuration file of the component.

- Components: description of the component. At the end of this section
  "EndComponents" must be specified. For each component its name, list of
  sections in configuration file and parameters in these sections necessary
  for proper operation of the component are specified. The list of sections
  and parameters is comma separated.
  To describe parameters properly you must specify full path to them (e.g.
  /Quarantine/DBISettings). In description of sections only their names must
  be specified (e.g. General).
  Back slash in descriptions of sections and parameters is used to denote
  line breaks.

Example of amc-file from Dr.Web MailD package for Linux:

Application "MAILD"
  id              40
  ConfFile        "/etc/drweb/maild_smtp.conf"
  Components
    lookup_ldap     LDAP
    lookup_regex    REGEX
    drweb-maild     General, Logging, MailBase, Stat, Maild, Filters,\
                    Quarantine, /_Rules=Rule*:Rules, /Reports/Send,\
                    /Reports/SendTimes, /Reports/Names, /Reports/MaxPoolSize,\
                    /Reports/MaxStoreInDbPeriod, /Reports/CheckForRemovePeriod,\
                    /Notifier/FilterMail, /Notifier/NotifyLangs,\
                    /Notifier/LngBaseDir
    drweb-notifier  General, Logging, Notifier, /Sender/Method, /_Rules,\
                    Reports, /Filters/BeforeQueueFilters,\
                    /Filters/AfterQueueFilters, /Quarantine/AccessByEmail,\
                    /Quarantine/StoredTime
    drweb-sender    General, Logging, Sender
    drweb-receiver  General, Logging, /Maild/ProtectedNetworks,\
                    /Maild/ProtectedDomains, /Maild/IncludeSubdomains,\
                    SASL, Receiver
  EndComponents
EndApplication

Setup of Components
To start up in Enterprise mode after installation it is necessary to specify
the changes in local configuration files of Agent and Monitor.

For Agent
In [EnterpriseMode] section of Agent configuration file /etc/drweb/agent.conf
set the following parameter values:
  UseEnterpriseMode = Yes;
  PublicKeyFile = /var/drweb/drwcsd.pub (encryption public key for the access
  to central protection server. Take this file from the corresponding directory of
  ESS Server and move it to the specified path);
  ServerHost = IP-address or host name of ES Server;
  ServerPort = ES Server port (2193 by default).

It is also necessary to configure Dr.Web Monitor. To do this, set the following
parameter values In [Monitor] section of the Monitor configuration file
/etc/drweb/monitor.conf:
  UseEnterpriseMode = Yes.

Important! To instruct Monitor to run Agent for ES Server 10, open also the agent.mmc
meta-configuration file and replace "drweb-agent" (executable file name) with
"drweb-agent10".

To start up in Standalone mode, do the following:
For Agent:
In [EnterpriseMode] section of Agent configuration file /etc/drweb/agent.conf
set the following parameter values:
  UseEnterpriseMode = No;

For Monitor:
1. Make sure that all necessary modules that you want Monitor to start are
listed in the RunAppList parameter under the [Monitor] section of Monitor
configuration file (by default, /etc/drweb/monitor.conf).
2. In the [Monitor] section of Monitor configuration file, set the
UseEnterpriseMode parameter to No. On switching to this mode, all settings of
installes Dr.Web applications are unlocked and restored to their previous or
default values.

Additional functions

Agent can collect antivirus statistics and send it to <http://stat.drweb.com>. 
In Enterprise mode Agent sends statistics to Dr.Web Enterprise Suite server.
