Hi everyone!
I am trying to change remotely agent's configuration from the manager. I want to change the manager's IP where the agent has to connect. For that I wrote this on manager's /var/ossec/etc/shared/default/agent.conf :
<agent_config>
<!-- Shared agent configuration here -->
<client>
<server>
<address>192.168.77.130</address>
</server>
</client>
</agent_config>
The agent does receive it well because in \shared agent.conf appears the same and merged.mg does reflect the changes too:
#default
!78 ar.conf
restart-ossec0 - restart-ossec.sh - 0
restart-ossec0 - restart-ossec.cmd - 0
!168 agent.conf
<agent_config>
<!-- Shared agent configuration here -->
<client>
<server>
<address>192.168.77.130</address>
</server>
</client>
</agent_config>
!28416 cis_apache2224_rcl.txt
.
.
.
But the agent's ossec.conf does not change that IP address and still shows the IP address I configured at the beggining:
<client>
<server>
<address>192.168.77.128</address>
<port>1514</port>
<protocol>tcp</protocol>
</server>
<crypto_method>aes</crypto_method>
<notify_time>10</notify_time>
<time-reconnect>60</time-reconnect>
<auto_restart>yes</auto_restart>
</client>
How do I overwrite ossec.conf automatically without handwriting the new IP?
Thanks!
Hi everyone!
I am trying to change remotely agent's configuration from the manager. I want to change the manager's IP where the agent has to connect. For that I wrote this on manager's /var/ossec/etc/shared/default/agent.conf :
<agent_config><!-- Shared agent configuration here --><client><server><address>192.168.77.130</address></server></client></agent_config>The agent does receive it well because in \shared agent.conf appears the same and merged.mg does reflect the changes too:
#default!78 ar.confrestart-ossec0 - restart-ossec.sh - 0restart-ossec0 - restart-ossec.cmd - 0!168 agent.conf<agent_config><!-- Shared agent configuration here --><client><server><address>192.168.77.130</address></server></client></agent_config>!28416 cis_apache2224_rcl.txt.
.
.
But the agent's ossec.conf does not change that IP address and still shows the IP address I configured at the beggining:
<client><server><address>192.168.77.128</address><port>1514</port><protocol>tcp</protocol></server><crypto_method>aes</crypto_method><notify_time>10</notify_time><time-reconnect>60</time-reconnect><auto_restart>yes</auto_restart></client>How do I overwrite ossec.conf automatically without handwriting the new IP?
Thanks!