Skip to content

Instantly share code, notes, and snippets.

@akechi1980
Forked from frk1/ipv4.txt
Created March 1, 2020 11:38
Show Gist options
  • Select an option

  • Save akechi1980/fc11c106dbd05ef147a5105d8a39f24d to your computer and use it in GitHub Desktop.

Select an option

Save akechi1980/fc11c106dbd05ef147a5105d8a39f24d to your computer and use it in GitHub Desktop.
Get Netflix IP ranges
#!/usr/bin/env bash
set -e
# This command finds the ASNUMs owned by netflix
curl -s http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum2.zip | gunzip | cut -d"," -f3 | sed 's/"//g' | sort -u | grep -i netflix
# For the four ASNUMs currently in possession of netflix that would be:
whois -h whois.radb.net -- '-i origin AS2906' | grep -Eo "([0-9.]+){4}/[0-9]+" | tee netflix_ranges.txt \
&& whois -h whois.radb.net -- '-i origin AS394406' | grep -Eo "([0-9.]+){4}/[0-9]+" | tee netflix_ranges.txt \
&& whois -h whois.radb.net -- '-i origin AS40027' | grep -Eo "([0-9.]+){4}/[0-9]+" | tee netflix_ranges.txt \
&& whois -h whois.radb.net -- '-i origin AS55095' | grep -Eo "([0-9.]+){4}/[0-9]+" | tee netflix_ranges.txt
# Done!
# 2017-10-01T14:14:44+00:00
69.53.224.0/19
208.75.76.0/22
37.77.184.0/21
208.75.76.0/24
208.75.77.0/24
208.75.78.0/24
208.75.79.0/24
108.175.32.0/20
198.38.96.0/19
198.45.48.0/20
185.2.220.0/22
185.2.220.0/22
185.2.220.0/24
185.2.221.0/24
192.173.64.0/18
23.246.0.0/18
185.9.188.0/22
198.38.116.0/24
198.38.117.0/24
198.38.118.0/24
198.38.119.0/24
198.38.120.0/24
198.38.121.0/24
45.57.0.0/17
64.120.128.0/17
64.120.128.0/17
66.197.128.0/17
66.197.128.0/17
23.246.20.0/24
23.246.30.0/24
23.246.31.0/24
69.53.242.0/24
45.57.42.0/24
45.57.16.0/24
45.57.17.0/24
45.57.60.0/24
37.77.184.0/23
37.77.184.0/23
37.77.186.0/23
37.77.186.0/23
37.77.188.0/23
37.77.188.0/23
23.246.15.0/24
108.175.47.0/24
23.246.29.0/24
23.246.28.0/24
45.57.8.0/23
45.57.8.0/24
45.57.9.0/24
45.57.40.0/24
69.53.250.0/24
69.53.254.0/24
69.53.229.0/24
69.53.228.0/24
69.53.227.0/24
69.53.253.0/24
208.75.76.0/22
69.53.224.0/19
38.72.126.0/24
69.53.242.0/24
69.53.242.0/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment