Um zu sehen welche Länder anhand ihrer IP Adresse häufig von Fail2ban geblockt werden, könnt ihr mit GEOIP dies Auslesen und mit einem Kommando befehl anzeigen lassen

Ertsmal das Packet geoip Installieren

sudo apt-get install geoip-bin

Nun folgenden befehl eingeben

cat /var/log/fail2ban.log* | grep Ban | sed 's/.*[Bb]an \(.*\)/\1/' | uniq | while read line; do geoiplookup $line; done | sort | uniq -c | sort -nr

Je nach Logfile Größe kann es dauern, am schluss bekommt ihr eine Liste

 3026 GeoIP Country Edition: US, United States
1326 GeoIP Country Edition: LT, Lithuania
1093 GeoIP Country Edition: GB, United Kingdom
751 GeoIP Country Edition: DE, Germany
656 GeoIP Country Edition: JP, Japan
511 GeoIP Country Edition: BG, Bulgaria
503 GeoIP Country Edition: SG, Singapore
334 GeoIP Country Edition: RU, Russian Federation
322 GeoIP Country Edition: IP Address not found
319 GeoIP Country Edition: NL, Netherlands
291 GeoIP Country Edition: PL, Poland
288 GeoIP Country Edition: IN, India
258 GeoIP Country Edition: BR, Brazil
252 GeoIP Country Edition: KR, Korea, Republic of
228 GeoIP Country Edition: CN, China
201 GeoIP Country Edition: FR, France
155 GeoIP Country Edition: HK, Hong Kong
125 GeoIP Country Edition: VN, Vietnam
117 GeoIP Country Edition: IR, Iran, Islamic Republic of
104 GeoIP Country Edition: NO, Norway
101 GeoIP Country Edition: ID, Indonesia

AncoraThemes © Copyright 2024. All Rights Reserved.