Fastly IP ranges
- IPv4 ranges
- 21
- IPv6 ranges
- 3
- Last change
- 06.12.2026
- Last check
- 06.12.2026
Official source
One range per line, IPv4 first, then IPv6.
Add the lines to a server or location block. The last line blocks every other address.
Add the lines to an .htaccess file or a Directory block. Access is allowed only from the addresses in the list.
The rules allow TCP connections to ports 80 and 443 from the addresses in the list, with iptables and ip6tables.
The rules allow TCP connections to ports 80 and 443 from the addresses in the list. IPv6 ranges work when IPV6=yes is set in /etc/default/ufw.
The commands create a separate zone named fastly, allow TCP connections to ports 80 and 443 in it from the addresses in the list, and reload the configuration.
Add the lines to /etc/csf/csf.allow and restart the firewall with csf -r. The lines allow TCP connections to ports 80 and 443, and IPv6 ranges work when the IPV6 option is enabled in csf.conf.
The rules allow TCP connections to ports 80 and 443 from the addresses in the list. The inet filter table and the input chain must already exist.
23.235.32.0/20
43.249.72.0/22
90.98.0.0/17
90.98.128.0/18
103.244.50.0/24
103.245.222.0/23
103.245.224.0/24
104.156.80.0/20
140.248.64.0/18
140.248.128.0/17
146.75.0.0/17
151.101.0.0/16
157.52.64.0/18
167.82.0.0/17
167.82.128.0/20
167.82.160.0/20
167.82.224.0/20
172.111.64.0/18
185.31.16.0/22
199.27.72.0/21
199.232.0.0/16
2a04:4e40::/32
2a04:4e42::/31
2a04:4e44::/32Why you need the Fastly addresses
Fastly serves your site from its own servers, and contacts your origin server only when the content is not in the cache or when the request needs processing. The addresses in the list are where these requests come from. With them, you close your origin server to anyone who tries to reach it directly, and you can tell in your logs which traffic came from Fastly.
The visitor IP in the Fastly-Client-IP header
Fastly adds the Fastly-Client-IP header with the client address to requests, and the value is kept even when the request passes through several Fastly servers on its way to the origin (shielding). According to Fastly, when the visitor sends this header themselves, their value is kept. So it is a good idea to set the header again in your service's VCL code, in vcl_recv, before you trust it on the server:
set_real_ip_from 23.235.32.0/20;
set_real_ip_from 43.249.72.0/22;
set_real_ip_from 90.98.0.0/17;
set_real_ip_from 90.98.128.0/18;
set_real_ip_from 103.244.50.0/24;
set_real_ip_from 103.245.222.0/23;
set_real_ip_from 103.245.224.0/24;
set_real_ip_from 104.156.80.0/20;
set_real_ip_from 140.248.64.0/18;
set_real_ip_from 140.248.128.0/17;
set_real_ip_from 146.75.0.0/17;
set_real_ip_from 151.101.0.0/16;
set_real_ip_from 157.52.64.0/18;
set_real_ip_from 167.82.0.0/17;
set_real_ip_from 167.82.128.0/20;
set_real_ip_from 167.82.160.0/20;
set_real_ip_from 167.82.224.0/20;
set_real_ip_from 172.111.64.0/18;
set_real_ip_from 185.31.16.0/22;
set_real_ip_from 199.27.72.0/21;
set_real_ip_from 199.232.0.0/16;
set_real_ip_from 2a04:4e40::/32;
set_real_ip_from 2a04:4e42::/31;
set_real_ip_from 2a04:4e44::/32;
real_ip_header Fastly-Client-IP;- This list is published by Fastly in an official file, and we check it every week. The service is not affiliated with ErezNet.
- On a Linux VPS, you get full root access and configure the firewall and the web server yourself with these lists.
Fastly IP ranges FAQ
How do I allow access to my server only through Fastly?
Add a rule to your server's firewall that allows ports 80 and 443 only for the addresses in the list, and block all other addresses. The ready-made formats on this page, such as nginx, iptables, UFW, and firewalld, save you the work. When the list changes, update your rules too.
How do I show the real visitor IP behind Fastly?
The server receives requests from the Fastly addresses, and the visitor's address arrives in an HTTP header. Set the addresses in the list as trusted, for example in the nginx realip module or in Apache mod_remoteip, and your logs and site show the visitor's address.
How often is the list on this page updated?
We check the official Fastly file once a week and update the page when something changes. The date of the last check is at the top of the page, and the recent changes are at the bottom.