Hi @
iamfuntosam:
I hope you are fine.
If you are not able to use the default ports 1515 (for agent auth) and 1514 (for agent communication with the manager), you can change this in the <auth> section and <remote> section of the Wazuh manager config respectively:
# vi /var/ossec/etc/ossec.conf
...
<remote>
<connection>secure</connection>
<port>1514</port>
<protocol>tcp</protocol>
<queue_size>131072</queue_size>
</remote>
<auth>
<disabled>no</disabled>
<port>1515</port>
<use_source_ip>no</use_source_ip>
<force_insert>yes</force_insert>
<force_time>0</force_time>
<purge>yes</purge>
<use_password>no</use_password>
<ciphers>HIGH:!ADH:!EXP:!MD5:!RC4:!3DES:!CAMELLIA:@STRENGTH</ciphers>
<!-- <ssl_agent_ca></ssl_agent_ca> -->
<ssl_verify_host>no</ssl_verify_host>
<ssl_manager_cert>etc/sslmanager.cert</ssl_manager_cert>
<ssl_manager_key>etc/sslmanager.key</ssl_manager_key>
<ssl_auto_negotiate>no</ssl_auto_negotiate>
</auth>
You should not use any of the reserved ports for typical services as port 80 (HTTP service) in order to avoid conflicts with them. Typically all ports from 0 to 1023 are reserved for common TCP/IP applications.
Once you have this change, you will need to restart the Wazuh manager:
# systemctl restart wazuh-manager
In all the agents, the configuration of the communication port must be also changed:
# vi /var/ossec/etc/ossec.conf
...
<client>
<server>
<address>192.168.19.129</address>
<port>1514</port>
<protocol>tcp</protocol>
</server>
...
And the agents restarted after that:
# systemctl restart wazuh-agent
Again, be sure that the ports that you have chosen are opened by your Sysadmin and free to be used by agent-manager communication.
I hope this helps.
Thanks