Skip to content

Instantly share code, notes, and snippets.

@wokamoto
Created March 2, 2018 11:57
Show Gist options
  • Save wokamoto/06fa58cbf1a7456f99335a7d0b2c8fa0 to your computer and use it in GitHub Desktop.
Save wokamoto/06fa58cbf1a7456f99335a7d0b2c8fa0 to your computer and use it in GitHub Desktop.
[AWS] CloudFront が使用する IP レンジを調べる ref: https://qiita.com/wokamoto/items/fd9c064c3608912085c1
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="CLOUDFRONT")
$ curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="CLOUDFRONT") | .ip_prefix' | awk '{print "set_real_ip_from " $1 ";"}'
set_real_ip_from 13.32.0.0/15;
set_real_ip_from 13.35.0.0/16;
set_real_ip_from 13.54.63.128/26;
set_real_ip_from 13.59.250.0/26;
set_real_ip_from 13.113.203.0/24;
set_real_ip_from 13.124.199.0/24;
set_real_ip_from 13.228.69.0/24;
set_real_ip_from 18.216.170.128/25;
set_real_ip_from 34.195.252.0/24;
set_real_ip_from 34.216.51.0/25;
set_real_ip_from 34.226.14.0/24;
set_real_ip_from 34.232.163.208/29;
set_real_ip_from 35.158.136.0/24;
set_real_ip_from 35.162.63.192/26;
set_real_ip_from 35.167.191.128/26;
set_real_ip_from 52.15.127.128/26;
set_real_ip_from 52.46.0.0/18;
set_real_ip_from 52.47.139.0/24;
set_real_ip_from 52.52.191.128/26;
set_real_ip_from 52.56.127.0/25;
set_real_ip_from 52.57.254.0/24;
set_real_ip_from 52.66.194.128/26;
set_real_ip_from 52.78.247.128/26;
set_real_ip_from 52.84.0.0/15;
set_real_ip_from 52.199.127.192/26;
set_real_ip_from 52.212.248.0/26;
set_real_ip_from 52.220.191.0/26;
set_real_ip_from 52.222.128.0/17;
set_real_ip_from 54.182.0.0/16;
set_real_ip_from 54.192.0.0/16;
set_real_ip_from 54.230.0.0/16;
set_real_ip_from 54.233.255.128/26;
set_real_ip_from 54.239.128.0/18;
set_real_ip_from 54.239.192.0/19;
set_real_ip_from 54.240.128.0/18;
set_real_ip_from 70.132.0.0/18;
set_real_ip_from 143.204.0.0/16;
set_real_ip_from 204.246.164.0/22;
set_real_ip_from 204.246.168.0/22;
set_real_ip_from 204.246.174.0/23;
set_real_ip_from 204.246.176.0/20;
set_real_ip_from 205.251.192.0/19;
set_real_ip_from 205.251.249.0/24;
set_real_ip_from 205.251.250.0/23;
set_real_ip_from 205.251.252.0/23;
set_real_ip_from 205.251.254.0/24;
set_real_ip_from 216.137.32.0/19;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment