Skip to content

Instantly share code, notes, and snippets.

@francio87
Last active March 15, 2022 16:52
Show Gist options
  • Save francio87/64e4be24a042fc72bdaf01fd9e0517d2 to your computer and use it in GitHub Desktop.
Save francio87/64e4be24a042fc72bdaf01fd9e0517d2 to your computer and use it in GitHub Desktop.
Drop iptables

grep DPT=3389 /var/log/firewall.log | awk '{print $9}' | sort | uniq -c

[root@nethsecurity ~]# grep DPT=3389 /var/log/firewall.log | awk '{print $9}' | sort | uniq -c

 82 SRC=185.156.74.10
112 SRC=185.156.74.11
100 SRC=185.156.74.12
 18 SRC=185.156.74.13
 79 SRC=185.156.74.14
100 SRC=185.156.74.15
 98 SRC=185.156.74.16
 81 SRC=185.156.74.17
 24 SRC=185.156.74.18
105 SRC=185.156.74.19

block destinati a portforward

iptables -I FORWARD -s 185.193.88.0/24 -j DROP

block destinati firewall

iptables -I INPUT -s 45.146.0.0/16 -j DROP


Suricata:

[root@cntr ~]# grep Non-standard /var/log/suricata/fast.log |awk '{print $21}' | cut -d ':' -f 1 |sort |uniq -c

20429 103.127.206.228 110 103.159.51.88 23545 103.200.23.65 152 103.42.253.66 25520 103.62.95.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment