Official list: https://www.cloudflare.com/ips/
You can also query from radb:
1 |
php query-ips.php -d -s AS-CLOUDFLARE -o lib/cloudflare.txt |
BTW: I only add 104.16.0.0/12 in my route collection.
sskaje's blog, study & research on technology
Official list: https://www.cloudflare.com/ips/
You can also query from radb:
1 |
php query-ips.php -d -s AS-CLOUDFLARE -o lib/cloudflare.txt |
BTW: I only add 104.16.0.0/12 in my route collection.
Facebook’s official developer site has a page: https://developers.facebook.com/docs/sharing/webmasters/crawler
showing how to get ip addresses used by crawler.
1 |
whois -h whois.radb.net -- '-i origin AS32934' | grep ^route |
you can also use my project to query AS-FACEBOOK.
Google introduces its TXT/spf records including all Google’s IP: Google IP address ranges
1 2 3 4 |
# dig google.com TXT ... google.com. 3579 IN TXT "v=spf1 include:_spf.google.com ip4:216.73.93.70/31 ip4:216.73.93.72/31 ~all" ... |
1 2 3 4 |
# dig _spf.google.com TXT ... _spf.google.com. 154 IN TXT "v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all" ... |
_netblocks.google.com describes ipv4 ranges.
1 2 3 4 |
# dig _netblocks.google.com TXT ... _netblocks.google.com. 2468 IN TXT "v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/19 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:209.85.128.0/17 ip4:66.102.0.0/20 ip4:74.125.0.0/16 ip4:64.18.0.0/20 ip4:207.126.144.0/20 ip4:173.194.0.0/16 ~all" ... |
_netblocks2.google.com describes ipv6 ranges
1 2 3 |
# dig _netblocks2.google.com TXT ... _netblocks2.google.com. 2495 IN TXT "v=spf1 ip6:2001:4860:4000::/36 ip6:2404:6800:4000::/36 ip6:2607:f8b0:4000::/36 ip6:2800:3f0:4000::/36 ip6:2a00:1450:4000::/36 ip6:2c0f:fb50:4000::/36 ~all" |
_netblocks3.google.com is currently empty.
Now we have list of IPv4 ranges, but we know google provides a public dns service, 8.8.8.8/8.8.4.4 (for ipv6 2001:4860:4860::8888/2001:4860:4860::8844).
we can treat these two as 8.8.8.8/32 and 8.8.4.4/32 or just make it as 8.8.0.0/16.
IP/CIDR | IP Begin | IP End | Netmask |
---|---|---|---|
216.239.32.0/19 | 216.239.32.0 | 216.239.63.255 | 255.255.224.0 |
64.233.160.0/19 | 64.233.160.0 | 64.233.191.255 | 255.255.224.0 |
66.249.80.0/20 | 66.249.80.0 | 66.249.95.255 | 255.255.240.0 |
72.14.192.0/18 | 72.14.192.0 | 72.14.255.255 | 255.255.192.0 |
209.85.128.0/17 | 209.85.128.0 | 209.85.255.255 | 255.255.128.0 |
66.102.0.0/20 | 66.102.0.0 | 66.102.15.255 | 255.255.240.0 |
74.125.0.0/16 | 74.125.0.0 | 74.125.255.255 | 255.255.0.0 |
64.18.0.0/20 | 64.18.0.0 | 64.18.15.255 | 255.255.240.0 |
207.126.144.0/20 | 207.126.144.0 | 207.126.159.255 | 255.255.240.0 |
173.194.0.0/16 | 173.194.0.0 | 173.194.255.255 | 255.255.0.0 |
8.8.8.8/32 | 8.8.8.8 | 8.8.8.8 | 255.255.255.255 |
8.8.4.4/32 | 8.8.4.4 | 8.8.4.4 | 255.255.255.255 |
8.8.0.0/16 | 8.8.0.0 | 8.8.255.255 | 255.255.0.0 |
生成一份从大陆地区的IP到省市编号的映射列表,用于数据分析。
统计局提供的标准行政区划代码 http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/,身份证前6位的编号。
从 http://dev.maxmind.com/geoip/geoip2/geolite2/ 下载CSV格式的城市数据库
新浪首页提供一个IP查询接口,可以输出TSV,JSONP,JSON的IP信息
Continue reading “从GeoIP免费库里生成IP到省市编号的组合” »