I ran this command

cat /var/log/syslog | grep SRC= | awk '{print $1,$2, $3, $12}'

I saw thousands of IPs

Apr 24 23:15:47 SRC=
Apr 24 23:15:59 SRC=
Apr 24 23:16:18 SRC=
Apr 24 23:16:38 SRC=
Apr 24 23:16:59 SRC=
Apr 24 23:17:21 SRC=
Apr 24 23:17:40 SRC=
Apr 24 23:18:06 SRC=
Apr 24 23:18:34 SRC=
Apr 24 23:18:41 SRC=
Apr 24 23:19:10 SRC=
Apr 24 23:19:30 SRC=
Apr 24 23:19:40 SRC=
Apr 24 23:20:00 SRC=
Apr 24 23:20:21 SRC=
Apr 24 23:20:46 SRC=

I wasn't able to find any relation of these IP in my /var/log/auth.log

Are these hackers/bots attempt to get in my box ?

  • 1
    Useless Use of cat, and look at surrounding lines: grep -A2 -B2 'SRC=' /var/log/syslog. Use journalctl, a better way of handling logs. Read journalctl hints in my AskUbuntu profile.
    – waltinator
    Apr 25 at 6:17
  • I ran your grep and not see same result as my cat command.
    – code8888
    Apr 25 at 15:23
  • @waltinator was just asking for some better context, same as I have. The grep command works fine, providing the previous and following 2 lines. Apr 25 at 15:36

For some reason you have hidden virtually all of the useful information from your question. However, yes it would mostly be hackers/bots searching for vulnerabilities. Some entries will be legitimate, and likely related to TCP sessions where your machine thinks the connection has been closed and forgotten, but the remote machine thinks it isn't.

Those log entries are probably from iptables log rules. If you are using UFW, know that it is just a front end for iptables. Notice that 7 out of 16 of your example list are from Please know that particular sub-net is one of a great many that are very bad. This from my iptables rule set, where I DROP the entire sub-net:

doug@s15:~$ sudo iptables -xvnL
Chain INPUT (policy DROP 14 packets, 1478 bytes)
pkts   bytes target     prot opt in     out     source               destination
2584   103392 DROP       all  --  enp1s0 *

Observe the rule has been hit 2584 times.

EDIT: By the way, I use the following method to find the worst players from the previous day (not including the ones I already specifically DROP):

doug@s15:~$ tail -20000 /var/log/syslog.1 | sed 's/ /\n/g' | grep "SRC=" | cut -d"." -f1,2,3,4 | sort | uniq -c | sort -g | tail -4
    265 SRC=
    392 SRC=
    621 SRC=
    855 SRC=
doug@s15:~$ tail -20000 /var/log/syslog.1 | sed 's/ /\n/g' | grep "SRC=" | cut -d"." -f1,2,3 | sort | uniq -c | sort -g | tail -4
    392 SRC=195.230.23
    429 SRC=162.142.125
    621 SRC=98.166.24
    855 SRC=130.211.9
doug@s15:~$ tail -20000 /var/log/syslog.1 | sed 's/ /\n/g' | grep "SRC=" | cut -d"." -f1,2 | sort | uniq -c | sort -g | tail -4
    429 SRC=162.142
    486 SRC=192.241
    621 SRC=98.166
    855 SRC=130.211

Note: I use tail because I often only search the last few hundred lines.

Please, for your next question, give us more information to work with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.