Created
February 25, 2025 08:54
-
-
Save n-ts/93cb88f5b9643815b42195ca9432fcfe to your computer and use it in GitHub Desktop.
All possible public (non private or reserved) IPv4 ranges in CIDR notion format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.0.0.0/8 | |
2.0.0.0/7 | |
4.0.0.0/6 | |
8.0.0.0/7 | |
11.0.0.0/8 | |
12.0.0.0/6 | |
16.0.0.0/4 | |
32.0.0.0/3 | |
64.0.0.0/3 | |
96.0.0.0/6 | |
100.0.0.0/10 | |
100.128.0.0/9 | |
101.0.0.0/8 | |
102.0.0.0/7 | |
104.0.0.0/5 | |
112.0.0.0/5 | |
120.0.0.0/6 | |
124.0.0.0/7 | |
126.0.0.0/8 | |
128.0.0.0/3 | |
160.0.0.0/5 | |
168.0.0.0/8 | |
169.0.0.0/9 | |
169.128.0.0/10 | |
169.192.0.0/11 | |
169.224.0.0/12 | |
169.240.0.0/13 | |
169.248.0.0/14 | |
169.252.0.0/15 | |
169.255.0.0/16 | |
170.0.0.0/7 | |
172.0.0.0/12 | |
172.32.0.0/11 | |
172.64.0.0/10 | |
172.128.0.0/9 | |
173.0.0.0/8 | |
174.0.0.0/7 | |
176.0.0.0/4 | |
192.0.1.0/24 | |
192.0.3.0/24 | |
192.0.4.0/22 | |
192.0.8.0/21 | |
192.0.16.0/20 | |
192.0.32.0/19 | |
192.0.64.0/18 | |
192.0.128.0/17 | |
192.1.0.0/16 | |
192.2.0.0/15 | |
192.4.0.0/14 | |
192.8.0.0/13 | |
192.16.0.0/12 | |
192.32.0.0/11 | |
192.64.0.0/12 | |
192.80.0.0/13 | |
192.88.0.0/18 | |
192.88.64.0/19 | |
192.88.96.0/24 | |
192.88.97.0/24 | |
192.88.98.0/24 | |
192.88.100.0/22 | |
192.88.104.0/21 | |
192.88.112.0/20 | |
192.88.128.0/17 | |
192.89.0.0/16 | |
192.90.0.0/15 | |
192.92.0.0/14 | |
192.96.0.0/11 | |
192.128.0.0/11 | |
192.160.0.0/13 | |
192.169.0.0/16 | |
192.170.0.0/15 | |
192.172.0.0/14 | |
192.176.0.0/12 | |
192.192.0.0/11 | |
192.224.0.0/12 | |
192.240.0.0/13 | |
192.248.0.0/14 | |
192.252.0.0/15 | |
192.254.0.0/16 | |
192.255.0.0/16 | |
193.0.0.0/8 | |
194.0.0.0/7 | |
196.0.0.0/7 | |
198.0.0.0/12 | |
198.16.0.0/15 | |
198.20.0.0/14 | |
198.24.0.0/13 | |
198.32.0.0/12 | |
198.48.0.0/15 | |
198.50.0.0/16 | |
198.51.0.0/18 | |
198.51.64.0/19 | |
198.51.96.0/22 | |
198.51.101.0/24 | |
198.51.102.0/23 | |
198.51.104.0/21 | |
198.51.112.0/20 | |
198.51.128.0/17 | |
198.52.0.0/14 | |
198.56.0.0/13 | |
198.64.0.0/10 | |
198.128.0.0/9 | |
199.0.0.0/8 | |
200.0.0.0/7 | |
202.0.0.0/8 | |
203.0.0.0/18 | |
203.0.64.0/19 | |
203.0.96.0/20 | |
203.0.112.0/24 | |
203.0.114.0/23 | |
203.0.116.0/22 | |
203.0.120.0/21 | |
203.0.128.0/17 | |
203.1.0.0/16 | |
203.2.0.0/15 | |
203.4.0.0/14 | |
203.8.0.0/13 | |
203.16.0.0/12 | |
203.32.0.0/11 | |
203.64.0.0/10 | |
203.128.0.0/9 | |
204.0.0.0/6 | |
208.0.0.0/4 |
For example, you can use this list to block all outgoing network traffic access in your firewall and ONLY allow access to publicly accessible internet resources while blocking all private and reserved IP networks. It can be also used for custom routing, proxy, VPN rules and for whatever else niche case you might need it for.
This list completely excludes all private/reserved /8 ranges:
0.0.0.0/8
10.0.0.0/8
127.0.0.0/8
224.0.0.0/8 (and everything above)
and fragments and partially excludes mixed public and private/reserved /8 ranges:
100.0.0.0/8
169.0.0.0/8
172.0.0.0/8
192.0.0.0/8
198.0.0.0/8
203.0.0.0/8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are interested in similar list of public IPv6 ranges, it's just
2000::/3
, nothing else to include, exclude or fragment.