GitHub IP ranges
59 IPv4 and 6 IPv6 prefixes that GitHub publishes for its services, with the region where the provider gives one.
Release Dec 5, 2026 · updated weekly, every Monday
IPv4 prefixes
59
IPv6 prefixes
6
IPv4 addresses
51.7M
GitHub IP ranges
One CIDR per line, for firewalls and scripts. The CSV adds the details.
Use the list
Fetch the list in a script, a firewall or a web server configuration. It changes when the provider changes its ranges.
# GitHub IPv4 and IPv6 ranges, one CIDR per line
curl -s https://ipinfo.zip/ip-ranges/github.txt -o github.txt
# nginx: allow only GitHub (e.g. in front of a load balancer)
awk '{ print "allow " $1 ";" }' github.txt > github-allow.conf
echo 'deny all;' >> github-allow.conf