Hi,
I have a question regarding agentless configuration.
I am trying to set up a cisco switch to send logs to my wazuh server but cannot seem to get it right.
I ran these commands first on my manager:
/var/ossec/bin/ossec-control enable agentless
/var/ossec/bin/ossec-control enable client-syslog
/var/ossec/bin/ossec-agentlessd enable
Then I registered the device using the script specified in documentation:
/var/ossec/agentless/register_host.sh add wa...@192.168.2.22 yolo
wazuh is username on my switch and yolo is password for that username.
I don’t have enable password set up. Is it really necessary to have enable pass running on switch? (I’m trying to figure that part out) Also I am not interested in PKI.
This is my ossec.conf:
<port>514</port>
<protocol>udp</protocol>
<allowed-ips>192.168.2.0/24</allowed-ips>
<allowed-ips>192.168.70.0/24</allowed-ips>
<local_ip>192.168.70.52</local_ip>
</remote>
<remote>
<connection>secure</connection>
<port>1514</port>
<protocol>udp</protocol>
<queue_size>131072</queue_size>
</remote>
<agentless>
<type>ssh_generic_diff</type>
<frequency>15</frequency>
<host>wa...@192.168.2.22</host>
<arguments>show log</arguments>
<state>periodic_diff</state>
</agentless>
Config on cisco switch:
logging trap notifications
logging origin-id hostname
logging host 192.168.70.52
Please let me know if you have any idea.
Additional note – Just checked on tcpdump and saw that syslogs do indeed come in, but don’t see anything on Kibana:
root@ubuntu18-wazuh:/var/ossec/etc# tcpdump -i any port 514
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
12:12:24.142340 IP 192.168.2.22.52201 > ubuntu18-wazuh.syslog: SYSLOG local7.notice, length: 136
12:12:25.140712 IP 192.168.2.22.52201 > ubuntu18-wazuh.syslog: SYSLOG local7.error, length: 114
12:12:28.452609 IP 192.168.2.22.52201 > ubuntu18-wazuh
Sent from Mail for Windows 10
tcpdump -i any port 514 -AA # /var/ossec/bin/ossec-logtest. . .
<logall>yes</logall>
<logall_json>yes</logall_json>
. . .
tail -f /var/ossec/logs/archives/archives.jsontail -f /var/ossec/logs/alerts/alerts.json--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/bfe4da13-375e-44e7-9ac4-ce7fc5722d52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<decoder name="custom_cisco_switch">
<prematch>[syslog</prematch>
</decoder>
<decoder name="custom_cisco_switch">
<parent>custom_cisco_switch</parent>
<regex>%(\.+):\.+Interface (\.+), (\.+)</regex>
<order>eventtype,interface,event</order>
</decoder><group name="cisco,custom,">
<rule id="100002" level="5">
<decoded_as>custom_cisco_switch</decoded_as>
<description>Message from Cisco Switch (custom decoder)</description>
</rule>
</group>--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/ce33862e-67ff-4a05-a25b-45cfee0c4479%40googlegroups.com.