cloud-ip-ranges:~$

Fastly logo Fastly IP Ranges

Download current IP ranges (CIDRs) used by the Fastly cloud infrastructure.

Provider Information

Category
CDN & Edge
Official Website
https://fastly.com
Total IP Ranges
21
19 IPv4 · 2 IPv6
Last Updated
Total Downloads
26,135

Download Options

Choose your preferred format. All downloads are permalinks that always provide the latest data.

IP Ranges

First 21 of 21 ranges. Download the full list above, or search for a specific IP.

CIDR Type Region Tag
23.235.32.0/20 ipv4 global fastly
43.249.72.0/22 ipv4 global fastly
103.244.50.0/24 ipv4 global fastly
103.245.222.0/23 ipv4 global fastly
103.245.224.0/24 ipv4 global fastly
104.156.80.0/20 ipv4 global fastly
140.248.64.0/18 ipv4 global fastly
140.248.128.0/17 ipv4 global fastly
146.75.0.0/17 ipv4 global fastly
151.101.0.0/16 ipv4 global fastly
157.52.64.0/18 ipv4 global fastly
167.82.0.0/17 ipv4 global fastly
167.82.128.0/20 ipv4 global fastly
167.82.160.0/20 ipv4 global fastly
167.82.224.0/20 ipv4 global fastly
172.111.64.0/18 ipv4 global fastly
185.31.16.0/22 ipv4 global fastly
199.27.72.0/21 ipv4 global fastly
199.232.0.0/16 ipv4 global fastly
2a04:4e40::/32 ipv6 global fastly
2a04:4e42::/32 ipv6 global fastly

Usage Examples - Blocking Fastly IPs

Download the IP ranges

# Download with curl
curl -O https://cloud-ip-ranges.com/download/fastly.txt

# Or download with wget
wget https://cloud-ip-ranges.com/download/fastly.txt

Block with iptables (Linux firewall)

# Download and block Fastly IPs with iptables
wget -O fastly_ips.txt https://cloud-ip-ranges.com/download/fastly.txt
while read ip; do
  iptables -A INPUT -s $ip -j DROP
  iptables -A OUTPUT -d $ip -j DROP
done < fastly_ips.txt

Block with UFW (Ubuntu/Debian firewall)

# Download and block Fastly IPs with UFW
wget -O fastly_ips.txt https://cloud-ip-ranges.com/download/fastly.txt
while read ip; do
  ufw deny from $ip
  ufw deny to $ip
done < fastly_ips.txt

Block with fail2ban (intrusion prevention)

# Create fail2ban filter for Fastly
sudo tee /etc/fail2ban/filter.d/fastly-block.conf << EOF
[Definition]
failregex = ^.*$
ignoreregex =
EOF

# Create jail configuration
sudo tee /etc/fail2ban/jail.d/fastly-block.conf << EOF
[fastly-block]
enabled = true
filter = fastly-block
action = iptables-allports[name=fastly]
logpath = /tmp/fastly_ips.txt
findtime = 1
bantime = -1
maxretry = 1
EOF

# Download IP list and restart fail2ban
wget -O /tmp/fastly_ips.txt https://cloud-ip-ranges.com/download/fastly.txt
sudo systemctl restart fail2ban

Block with pfSense/OPNsense (FreeBSD firewall)

# Create alias table for Fastly IPs
# 1. Download the IP list
wget -O fastly_ips.txt https://cloud-ip-ranges.com/download/fastly.txt

# 2. In pfSense/OPNsense web interface:
# - Go to Firewall > Aliases
# - Create new alias named "FASTLY_BLOCK"
# - Type: Network(s)
# - Import the downloaded file
#
# 3. Create firewall rule:
# - Go to Firewall > Rules > WAN
# - Add rule: Action=Block, Source=FASTLY_BLOCK

About Fastly IP Ranges

These IP ranges are sourced directly from Fastly's official feeds and are updated regularly to ensure accuracy. The data includes IPv4 and IPv6 ranges used by Fastly's infrastructure worldwide. Last update was 16 minutes ago.