A CLI tool for geolocating IP addresses and hosts and displaying them on a static street map. With support for identifying cloud provider addresses and TOR exit nodes
A Golang CLI tool for geolocating IP addresses and hosts and displaying them on a static street map. With support for identifying cloud provider addresses and TOR exit nodes
Download the free Geolite2 City and ASN MaxMind databases
Run go install github.com/D-Thatcher/go-geoip
Using the CLI tool
Usage of go-geoip:
-asn-mmdb input path of Geolite2-ASN.mmdb (default "GeoDB/GeoLite2-ASN.mmdb")
-city-mmdb input path of Geolite2-City.mmdb (default "GeoDB/GeoLite2-City.mmdb")
-connect true/false indicating whether to connect all the markers (default true)
-ip a comma delimited string of IP addresses or domains (default to your public IPv4)
-o output path of static map image (default "map.png")
-onlymarker true/false indicating whether to plot just a marker instead of text (default false)
Help Options:
-h, --help Show this help message
More examples
Example of:
Domain resolution (google.com, slack.com)
Referencing your own IP address by using the keyword me
Address lookup in cloud provider CIDR block address space. Note we store the CIDR block in our exit_node data 2406:da70:4000::/40 and check if the IP 2406:da70:4000::1:3f51 is in the subnet
Displaying both an AWS hosted zone, and a TOR exit node
TOR exit nodes are listed in exit_nodes/nodes.txt. You can update the list by running
bash scripts/get_latest_exit_nodes.sh
Cloud provider hosted address spaces are listed (currently only AWS IPv4 & IPv6 address blocks) exit_nodes/aws_ip.txt. You can update the list by running