Plot the location of failed login attempts made to a computer with an opened ssh port.
-
First, you need to get an API key for ipinfodb, and insert it in getlocation.py.
-
Set the variables
logFile
with the path to the log file, which depends on your system---for most Linux systems is 'var/log/auth.log'. SetfailStr
with is the string that appears in the line of a failed login attempt before the IP address in the log file. -
Finally, run the getlocation.py script. It will fetch the IP addresses from the log file and find its geolocation. It will then plot it on a map.
Resulting map