I'm setting up Filebeat (8.9) on an Elasticsearch (8.9) instance, and it looks like Filebeat is filtering logs from external hosts.
Here's the relevant section from my Filebeat config:
- type: syslog
format: auto
protocol.udp:
host: "0.0.0.0:9002"
It appears the port is open: sudo netstat -nulp
shows this:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 127.0.0.53:53 0.0.0.0:* 1216/systemd-resolv
udp6 0 0 :::9002 :::* 1687881/filebeat
Curiously, however, ss doesn't show the port being open: sudo ss -ltn
shows:
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 100 0.0.0.0:25 0.0.0.0:*
LISTEN 0 511 0.0.0.0:5601 0.0.0.0:*
LISTEN 0 4096 *:9200 *:*
LISTEN 0 4096 *:27761 *:*
LISTEN 0 4096 *:27762 *:*
LISTEN 0 4096 *:27763 *:*
LISTEN 0 4096 [::ffff:127.0.0.1]:9300 *:*
LISTEN 0 4096 [::1]:9300 [::]:*
LISTEN 0 4096 *:27764 *:*
LISTEN 0 4096 *:27765 *:*
LISTEN 0 4096 *:27766 *:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 4096 *:27767 *:*
LISTEN 0 4096 *:27768 *:*
LISTEN 0 100 [::]:25 [::]:*
I can send a message to myself: echo "test" | nc -w1 -u 127.0.0.1 9002
When I do this, I can see the log showing up in filebeat -e -d "*"
and in the Discover GUI.
However, when I send real traffic from another host, nothing shows up. I can see that the packet is being received:
sudo tcpdump -n 'udp port 9002'
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eno2, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:37:14.925978 IP [external host IP].52936 > [filebeat server IP].9002: UDP, length 102
What am I missing?