{"id":15674342,"url":"https://github.com/stephenlb/geo-ip","last_synced_at":"2026-03-06T02:05:52.321Z","repository":{"id":66632406,"uuid":"173212143","full_name":"stephenlb/geo-ip","owner":"stephenlb","description":"Generate a list of IP Addresses and Associated Geographical Information ( City, Country, Zip, Lat, Long )","archived":false,"fork":false,"pushed_at":"2020-04-17T22:20:28.000Z","size":32932,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T22:57:01.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenlb.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-01T01:09:04.000Z","updated_at":"2024-09-27T15:41:46.000Z","dependencies_parsed_at":"2023-05-25T08:15:18.402Z","dependency_job_id":null,"html_url":"https://github.com/stephenlb/geo-ip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stephenlb/geo-ip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fgeo-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fgeo-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fgeo-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fgeo-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenlb","download_url":"https://codeload.github.com/stephenlb/geo-ip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fgeo-ip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30158921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T15:44:07.758Z","updated_at":"2026-03-06T02:05:52.301Z","avatar_url":"https://github.com/stephenlb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geo IP Generator\n\nGenerates a JSON dump of IP Addresses and associated Geo information.\nNote that the valid public IP Address range is\nfrom `'1.0.0.0/8'` to `'191.0.0.0/8'` excluding the reserved\nPrivate IP Address ranges shown lower down in this readme.\n\n```shell\ndocker build -t geo-ip .\ndocker run -e IPRANGE='54.0.0.0/30' geo-ip               ## a few IPs\ndocker run -e IPRANGE='54.0.0.0/26' geo-ip               ## a few more IPs\ndocker run -e IPRANGE='54.0.0.0/16' geo-ip               ## a lot more IPs\ndocker run -e IPRANGE='0.0.0.0/0'   geo-ip               ## ALL IPs ( slooooowwwwww )\ndocker run -e IPRANGE='0.0.0.0/0'   geo-ip \u003e geo-ip.json ## ALL IPs saved to JSON File\ndocker run geo-ip \n```\n\nA little faster option for scanning all valid public addresses.\nJust run the included helper script to generate all known valid public IP addresses:\n\n```shell\n./generate-all-valid-public-ip-addresses.sh\n```\n\nThe `generate-all-valid-public-ip-addresses.sh` script looks like this:\n\n```shell\nfor i in $(seq 1 191); do \\\n    docker run -e IPRANGE=\"$i.0.0.0/8\" geo-ip; \\\n    sleep 1; \\ \ndone\n```\n\nThis prints less than *4,228,250,625* JSON lines to STDOUT.\nHere is an example of one of the lines:\n\n```json\n{\"city\": \"Palo Alto\", \"ip\": \"0.0.0.0\", \"longitude\": -122.1274,\n \"continent\": \"North America\", \"continent_code\": \"NA\",\n \"state\": \"California\", \"country\": \"United States\", \"latitude\": 37.418,\n \"iso_code\": \"US\", \"state_code\": \"CA\", \"aso\": \"PubNub\",\n \"asn\": \"11404\", \"zip_code\": \"94107\"}\n```\n\n## Private and Reserved IP Range\n\nWe automatically exclude non-usable IP addresses\nfollowing the guide from the wikipedia article:\nhttps://en.wikipedia.org/wiki/Reserved_IP_addresses\n\n```python\n## Private IP Addresses\nprivate = iptools.IpRangeList(\n    '0.0.0.0/8',      '10.0.0.0/8',     '100.64.0.0/10', '127.0.0.0/8',\n    '169.254.0.0/16', '172.16.0.0/12',  '192.0.0.0/24',  '192.0.2.0/24',\n    '192.88.99.0/24', '192.168.0.0/16', '198.18.0.0/15', '198.51.100.0/24',\n    '203.0.113.0/24', '224.0.0.0/4',    '240.0.0.0/4',   '255.255.255.255/32'\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fgeo-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenlb%2Fgeo-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fgeo-ip/lists"}