Hello,
Many moons ago, a friend of mine build me a GrayLog 4.2.13 / elasticsearch 7.17.12 Linux server. I have no clue how the innards work. I just use the machine to search for stuff in syslog messages.
I let my Network switches, Linux Servers and my PfSense Firewall send messages to it. Works well.
I can do searches like showing all blocked traffic by doing:
source:myfirewall.mydomain.local AND message:block
and that shows me all the traffic that got blocked. Messages that PfSense sends, look like this “349,1593001719,lagg0.1,match,block,in,4,0x0,127,63994,0,DF,6,tcp,52,192.168.10.7,173.222.108.210,10163,80,0,S,884491034,64240,mss;nop;wscale;nop;nop;sackOK”
I also get messages like “sshd[28703]: Accepted password for root from 172.16.1.250 port 58405 ssh2” from Linux servers for example.
Being used to other syslog products at work, I thought I could simply look for a specific IP address (regardless if source-ip or dest-ip) by doing:
source:myfirewall.mydomain.local AND message:192.168.10.7
message:192.168.10.7
message:“192.168.10.7”
or even just:
192.168.10.7 or “192.168.10.7”
but then there is no output at all. It finds nothing.
Questions about finding IP addresses inside messages (not indexed, not in fields) have been asked many times before, so I tried things like:
source:myfirewall.mydomain.local AND message:192.168.10.7 with backslashes before each dot (not visible here so i’ll just write it verbally)
and many, many other suggestions (mostly involving regex, escaping characters)
but so far, nothing worked.
I have the impression that the problem lies with the dots in ip addresses because I can find anything else in message fields (they are just plain text), as long as they don’t have dots in them.
I’m lost. How do I search for ip addresses in the “message” field?