Cloudflare IP Ranges
- Runs in your browser
- Updated daily from Cloudflare
Unlimited: runs in your browser, no sign-in needed
- 1Input
- 2Results
Is this IP address Cloudflare's?
Cloudflare's current IP ranges
Last updated October 26, 2026, from Cloudflare's API. The list is checked again every day. Source: cloudflare.com/ips
IPv4 ranges (15)
| Range | First address | Last address | Addresses |
|---|---|---|---|
| 173.245.48.0/20 | 173.245.48.0 | 173.245.63.255 | 4,096 |
| 103.21.244.0/22 | 103.21.244.0 | 103.21.247.255 | 1,024 |
| 103.22.200.0/22 | 103.22.200.0 | 103.22.203.255 | 1,024 |
| 103.31.4.0/22 | 103.31.4.0 | 103.31.7.255 | 1,024 |
| 141.101.64.0/18 | 141.101.64.0 | 141.101.127.255 | 16,384 |
| 108.162.192.0/18 | 108.162.192.0 | 108.162.255.255 | 16,384 |
| 190.93.240.0/20 | 190.93.240.0 | 190.93.255.255 | 4,096 |
| 188.114.96.0/20 | 188.114.96.0 | 188.114.111.255 | 4,096 |
| 197.234.240.0/22 | 197.234.240.0 | 197.234.243.255 | 1,024 |
| 198.41.128.0/17 | 198.41.128.0 | 198.41.255.255 | 32,768 |
| 162.158.0.0/15 | 162.158.0.0 | 162.159.255.255 | 131,072 |
| 104.16.0.0/13 | 104.16.0.0 | 104.23.255.255 | 524,288 |
| 104.24.0.0/14 | 104.24.0.0 | 104.27.255.255 | 262,144 |
| 172.64.0.0/13 | 172.64.0.0 | 172.71.255.255 | 524,288 |
| 131.0.72.0/22 | 131.0.72.0 | 131.0.75.255 | 1,024 |
IPv6 ranges (7)
| Range | First address | Last address |
|---|---|---|
| 2400:cb00::/32 | 2400:cb00:: | 2400:cb00:ffff:ffff:ffff:ffff:ffff:ffff |
| 2606:4700::/32 | 2606:4700:: | 2606:4700:ffff:ffff:ffff:ffff:ffff:ffff |
| 2803:f800::/32 | 2803:f800:: | 2803:f800:ffff:ffff:ffff:ffff:ffff:ffff |
| 2405:b500::/32 | 2405:b500:: | 2405:b500:ffff:ffff:ffff:ffff:ffff:ffff |
| 2405:8100::/32 | 2405:8100:: | 2405:8100:ffff:ffff:ffff:ffff:ffff:ffff |
| 2a06:98c0::/29 | 2a06:98c0:: | 2a06:98c7:ffff:ffff:ffff:ffff:ffff:ffff |
| 2c0f:f248::/32 | 2c0f:f248:: | 2c0f:f248:ffff:ffff:ffff:ffff:ffff:ffff |
Copy-ready configuration
Put this in the http block. Logs, rate limits and allow rules then see the visitor's address instead of a Cloudflare one.
# Cloudflare IP ranges, retrieved 2026-10-26 from https://www.cloudflare.com/ips/ # Restores the visitor's address from CF-Connecting-IP (ngx_http_realip_module). set_real_ip_from 173.245.48.0/20; set_real_ip_from 103.21.244.0/22; set_real_ip_from 103.22.200.0/22; set_real_ip_from 103.31.4.0/22; set_real_ip_from 141.101.64.0/18; set_real_ip_from 108.162.192.0/18; set_real_ip_from 190.93.240.0/20; set_real_ip_from 188.114.96.0/20; set_real_ip_from 197.234.240.0/22; set_real_ip_from 198.41.128.0/17; set_real_ip_from 162.158.0.0/15; set_real_ip_from 104.16.0.0/13; set_real_ip_from 104.24.0.0/14; set_real_ip_from 172.64.0.0/13; set_real_ip_from 131.0.72.0/22; set_real_ip_from 2400:cb00::/32; set_real_ip_from 2606:4700::/32; set_real_ip_from 2803:f800::/32; set_real_ip_from 2405:b500::/32; set_real_ip_from 2405:8100::/32; set_real_ip_from 2a06:98c0::/29; set_real_ip_from 2c0f:f248::/32; real_ip_header CF-Connecting-IP;
Enable mod_remoteip and put this in the server configuration. Use %a in LogFormat to log the visitor's address.
# Cloudflare IP ranges, retrieved 2026-10-26 from https://www.cloudflare.com/ips/ # Restores the visitor's address from CF-Connecting-IP (mod_remoteip). RemoteIPHeader CF-Connecting-IP RemoteIPTrustedProxy 173.245.48.0/20 RemoteIPTrustedProxy 103.21.244.0/22 RemoteIPTrustedProxy 103.22.200.0/22 RemoteIPTrustedProxy 103.31.4.0/22 RemoteIPTrustedProxy 141.101.64.0/18 RemoteIPTrustedProxy 108.162.192.0/18 RemoteIPTrustedProxy 190.93.240.0/20 RemoteIPTrustedProxy 188.114.96.0/20 RemoteIPTrustedProxy 197.234.240.0/22 RemoteIPTrustedProxy 198.41.128.0/17 RemoteIPTrustedProxy 162.158.0.0/15 RemoteIPTrustedProxy 104.16.0.0/13 RemoteIPTrustedProxy 104.24.0.0/14 RemoteIPTrustedProxy 172.64.0.0/13 RemoteIPTrustedProxy 131.0.72.0/22 RemoteIPTrustedProxy 2400:cb00::/32 RemoteIPTrustedProxy 2606:4700::/32 RemoteIPTrustedProxy 2803:f800::/32 RemoteIPTrustedProxy 2405:b500::/32 RemoteIPTrustedProxy 2405:8100::/32 RemoteIPTrustedProxy 2a06:98c0::/29 RemoteIPTrustedProxy 2c0f:f248::/32
Accepts ports 80 and 443 from Cloudflare and drops them from everyone else. Ports that Docker publishes bypass INPUT; filter those in the DOCKER-USER chain.
# Cloudflare IP ranges, retrieved 2026-10-26 from https://www.cloudflare.com/ips/ # Allows TCP 80,443 from Cloudflare only. Appends to INPUT: keep your SSH and # established-connection rules above these, and remove broader web rules. iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 173.245.48.0/20 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 103.21.244.0/22 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 103.22.200.0/22 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 103.31.4.0/22 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 141.101.64.0/18 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 108.162.192.0/18 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 190.93.240.0/20 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 188.114.96.0/20 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 197.234.240.0/22 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 198.41.128.0/17 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 162.158.0.0/15 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 104.16.0.0/13 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 104.24.0.0/14 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 172.64.0.0/13 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 131.0.72.0/22 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -j DROP ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2400:cb00::/32 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2606:4700::/32 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2803:f800::/32 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2405:b500::/32 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2405:8100::/32 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2a06:98c0::/29 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s 2c0f:f248::/32 -j ACCEPT ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -j DROP
Allows ports 80 and 443 from each Cloudflare range. With ufw's default policy, other sources stay blocked.
# Cloudflare IP ranges, retrieved 2026-10-26 from https://www.cloudflare.com/ips/ # Allows TCP 80,443 from Cloudflare only, with ufw's default "deny incoming". # Delete broader rules first, such as "ufw allow 80/tcp" or "ufw allow 'Nginx Full'". ufw allow proto tcp from 173.245.48.0/20 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 103.21.244.0/22 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 103.22.200.0/22 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 103.31.4.0/22 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 141.101.64.0/18 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 108.162.192.0/18 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 190.93.240.0/20 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 188.114.96.0/20 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 197.234.240.0/22 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 198.41.128.0/17 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 162.158.0.0/15 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 104.16.0.0/13 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 104.24.0.0/14 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 172.64.0.0/13 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 131.0.72.0/22 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2400:cb00::/32 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2606:4700::/32 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2803:f800::/32 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2405:b500::/32 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2405:8100::/32 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2a06:98c0::/29 to any port 80,443 comment 'Cloudflare' ufw allow proto tcp from 2c0f:f248::/32 to any port 80,443 comment 'Cloudflare'
A separate table with interval sets for both address families. Its drop rule applies whatever your other tables accept.
# Cloudflare IP ranges, retrieved 2026-10-26 from https://www.cloudflare.com/ips/
# Drops TCP 80, 443 unless it comes from Cloudflare. Load with: nft -f cloudflare.nft
table inet cloudflare_origin {
set cloudflare_v4 {
type ipv4_addr
flags interval
elements = {
173.245.48.0/20,
103.21.244.0/22,
103.22.200.0/22,
103.31.4.0/22,
141.101.64.0/18,
108.162.192.0/18,
190.93.240.0/20,
188.114.96.0/20,
197.234.240.0/22,
198.41.128.0/17,
162.158.0.0/15,
104.16.0.0/13,
104.24.0.0/14,
172.64.0.0/13,
131.0.72.0/22,
}
}
set cloudflare_v6 {
type ipv6_addr
flags interval
elements = {
2400:cb00::/32,
2606:4700::/32,
2803:f800::/32,
2405:b500::/32,
2405:8100::/32,
2a06:98c0::/29,
2c0f:f248::/32,
}
}
chain input {
type filter hook input priority filter; policy accept;
tcp dport { 80, 443 } ip saddr @cloudflare_v4 accept
tcp dport { 80, 443 } ip6 saddr @cloudflare_v6 accept
tcp dport { 80, 443 } drop
}
}Adds inbound rules for ports 80 and 443 from every Cloudflare range. Then remove any rule that allows these ports from 0.0.0.0/0 or ::/0.
# Cloudflare IP ranges, retrieved 2026-10-26 from https://www.cloudflare.com/ips/
# Replace the group ID. Each range on each port counts as one rule toward the
# security group's inbound rule quota (60 by default).
aws ec2 authorize-security-group-ingress \
--group-id sg-0123456789abcdef0 \
--ip-permissions '[{"IpProtocol":"tcp","FromPort":80,"ToPort":80,"IpRanges":[{"CidrIp":"173.245.48.0/20","Description":"Cloudflare"},{"CidrIp":"103.21.244.0/22","Description":"Cloudflare"},{"CidrIp":"103.22.200.0/22","Description":"Cloudflare"},{"CidrIp":"103.31.4.0/22","Description":"Cloudflare"},{"CidrIp":"141.101.64.0/18","Description":"Cloudflare"},{"CidrIp":"108.162.192.0/18","Description":"Cloudflare"},{"CidrIp":"190.93.240.0/20","Description":"Cloudflare"},{"CidrIp":"188.114.96.0/20","Description":"Cloudflare"},{"CidrIp":"197.234.240.0/22","Description":"Cloudflare"},{"CidrIp":"198.41.128.0/17","Description":"Cloudflare"},{"CidrIp":"162.158.0.0/15","Description":"Cloudflare"},{"CidrIp":"104.16.0.0/13","Description":"Cloudflare"},{"CidrIp":"104.24.0.0/14","Description":"Cloudflare"},{"CidrIp":"172.64.0.0/13","Description":"Cloudflare"},{"CidrIp":"131.0.72.0/22","Description":"Cloudflare"}],"Ipv6Ranges":[{"CidrIpv6":"2400:cb00::/32","Description":"Cloudflare"},{"CidrIpv6":"2606:4700::/32","Description":"Cloudflare"},{"CidrIpv6":"2803:f800::/32","Description":"Cloudflare"},{"CidrIpv6":"2405:b500::/32","Description":"Cloudflare"},{"CidrIpv6":"2405:8100::/32","Description":"Cloudflare"},{"CidrIpv6":"2a06:98c0::/29","Description":"Cloudflare"},{"CidrIpv6":"2c0f:f248::/32","Description":"Cloudflare"}]},{"IpProtocol":"tcp","FromPort":443,"ToPort":443,"IpRanges":[{"CidrIp":"173.245.48.0/20","Description":"Cloudflare"},{"CidrIp":"103.21.244.0/22","Description":"Cloudflare"},{"CidrIp":"103.22.200.0/22","Description":"Cloudflare"},{"CidrIp":"103.31.4.0/22","Description":"Cloudflare"},{"CidrIp":"141.101.64.0/18","Description":"Cloudflare"},{"CidrIp":"108.162.192.0/18","Description":"Cloudflare"},{"CidrIp":"190.93.240.0/20","Description":"Cloudflare"},{"CidrIp":"188.114.96.0/20","Description":"Cloudflare"},{"CidrIp":"197.234.240.0/22","Description":"Cloudflare"},{"CidrIp":"198.41.128.0/17","Description":"Cloudflare"},{"CidrIp":"162.158.0.0/15","Description":"Cloudflare"},{"CidrIp":"104.16.0.0/13","Description":"Cloudflare"},{"CidrIp":"104.24.0.0/14","Description":"Cloudflare"},{"CidrIp":"172.64.0.0/13","Description":"Cloudflare"},{"CidrIp":"131.0.72.0/22","Description":"Cloudflare"}],"Ipv6Ranges":[{"CidrIpv6":"2400:cb00::/32","Description":"Cloudflare"},{"CidrIpv6":"2606:4700::/32","Description":"Cloudflare"},{"CidrIpv6":"2803:f800::/32","Description":"Cloudflare"},{"CidrIpv6":"2405:b500::/32","Description":"Cloudflare"},{"CidrIpv6":"2405:8100::/32","Description":"Cloudflare"},{"CidrIpv6":"2a06:98c0::/29","Description":"Cloudflare"},{"CidrIpv6":"2c0f:f248::/32","Description":"Cloudflare"}]}]'The same rules as IpPermissions JSON, for the EC2 API or an AWS SDK call.
[
{
"IpProtocol": "tcp",
"FromPort": 80,
"ToPort": 80,
"IpRanges": [
{
"CidrIp": "173.245.48.0/20",
"Description": "Cloudflare"
},
{
"CidrIp": "103.21.244.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "103.22.200.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "103.31.4.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "141.101.64.0/18",
"Description": "Cloudflare"
},
{
"CidrIp": "108.162.192.0/18",
"Description": "Cloudflare"
},
{
"CidrIp": "190.93.240.0/20",
"Description": "Cloudflare"
},
{
"CidrIp": "188.114.96.0/20",
"Description": "Cloudflare"
},
{
"CidrIp": "197.234.240.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "198.41.128.0/17",
"Description": "Cloudflare"
},
{
"CidrIp": "162.158.0.0/15",
"Description": "Cloudflare"
},
{
"CidrIp": "104.16.0.0/13",
"Description": "Cloudflare"
},
{
"CidrIp": "104.24.0.0/14",
"Description": "Cloudflare"
},
{
"CidrIp": "172.64.0.0/13",
"Description": "Cloudflare"
},
{
"CidrIp": "131.0.72.0/22",
"Description": "Cloudflare"
}
],
"Ipv6Ranges": [
{
"CidrIpv6": "2400:cb00::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2606:4700::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2803:f800::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2405:b500::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2405:8100::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2a06:98c0::/29",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2c0f:f248::/32",
"Description": "Cloudflare"
}
]
},
{
"IpProtocol": "tcp",
"FromPort": 443,
"ToPort": 443,
"IpRanges": [
{
"CidrIp": "173.245.48.0/20",
"Description": "Cloudflare"
},
{
"CidrIp": "103.21.244.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "103.22.200.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "103.31.4.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "141.101.64.0/18",
"Description": "Cloudflare"
},
{
"CidrIp": "108.162.192.0/18",
"Description": "Cloudflare"
},
{
"CidrIp": "190.93.240.0/20",
"Description": "Cloudflare"
},
{
"CidrIp": "188.114.96.0/20",
"Description": "Cloudflare"
},
{
"CidrIp": "197.234.240.0/22",
"Description": "Cloudflare"
},
{
"CidrIp": "198.41.128.0/17",
"Description": "Cloudflare"
},
{
"CidrIp": "162.158.0.0/15",
"Description": "Cloudflare"
},
{
"CidrIp": "104.16.0.0/13",
"Description": "Cloudflare"
},
{
"CidrIp": "104.24.0.0/14",
"Description": "Cloudflare"
},
{
"CidrIp": "172.64.0.0/13",
"Description": "Cloudflare"
},
{
"CidrIp": "131.0.72.0/22",
"Description": "Cloudflare"
}
],
"Ipv6Ranges": [
{
"CidrIpv6": "2400:cb00::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2606:4700::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2803:f800::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2405:b500::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2405:8100::/32",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2a06:98c0::/29",
"Description": "Cloudflare"
},
{
"CidrIpv6": "2c0f:f248::/32",
"Description": "Cloudflare"
}
]
}
]Rather not keep origin rules and range lists up to date yourself? Vigilbase Shield is Cloudflare, fully managed: our team sets up and tunes the WAF, DDoS protection and bot filtering for your sites. Explore Vigilbase Shield
Check how your Cloudflare account is set up
The Cloudflare Checkup reviews your account with read-only access, including SSL/TLS, WAF and DNS settings, grades it A to F and emails you the full report.
Introducing Vigilbase OS
The cybersecurity operating system.
Connect the security tools you already pay for. Spin up personalised dashboards in minutes, with every log and event auditable and queryable in one place.
Acme Security OS
events | where severity >= medium | last 24h- Investigate Credential-stuffing burst against /login
- Fix Rate-limit rule deployed at the edge
- Verify Attack traffic down 98% in five minutes
What are Cloudflare's IP ranges?
Cloudflare's IP ranges are the IPv4 and IPv6 address blocks of Cloudflare's network. When a DNS record is proxied, visitors connect to Cloudflare, and Cloudflare connects to your origin server from an address in these ranges. Cloudflare publishes the list at cloudflare.com/ips and through its API, and changes it rarely.
Origin servers behind Cloudflare use the list for two jobs: restoring each visitor's real IP address from the CF-Connecting-IP header, and accepting web traffic from Cloudflare only, so nobody can skip the WAF and DDoS protection by connecting to the origin directly.
How to use Cloudflare's IP ranges on your origin
1. Restore visitor IP addresses
Behind Cloudflare, every request reaches the origin from a Cloudflare address. Trust the CF-Connecting-IP header only from these ranges (set_real_ip_from in nginx, RemoteIPTrustedProxy in Apache). Trusting it from anywhere lets any client fake its address.
2. Accept web traffic from Cloudflare only
Allow ports 80 and 443 from these ranges and block them for everyone else, in the host firewall or your cloud provider's security group. Keep separate rules for SSH, mail and any hostname that is not proxied.
3. Authenticate the connection too
Every Cloudflare customer's traffic comes from the same ranges, so an IP allowlist alone does not prove a request came through your zone. Turn on Authenticated Origin Pulls, or connect the origin with Cloudflare Tunnel instead of opening ports.
4. Keep the list current
Cloudflare adds ranges from time to time. Rebuild the configuration from this page or from Cloudflare's API when the list changes, rather than copying it once and forgetting it.
Related checks and next steps
- Cloudflare Checker
See whether a website is on Cloudflare, and whether its traffic is proxied or DNS-only.
- Cloudflare Checkup
A read-only review of your Cloudflare account and zones, with an A to F grade and the fixes that matter most.
- HTTP Security Headers Checker
Check the security headers your site sends through Cloudflare.
- Vigilbase Shield
Cloudflare, fully managed: our team sets up and tunes the WAF, DDoS protection and bot filtering for your sites.
Managed Cloudflare
Keep Cloudflare configured, monitored and improving. Vigilbase handles agreed changes and incident response, with Core, Priority and Critical coverage options.
Explore Managed CloudflareManaged SOC
Managed SOC on the security tools you already pay for. The Vigil agent investigates, our analysts handle exceptions, and coverage follows your SLA tier.
Explore Managed SOC