Use the documentation ranges for anything public
A random address is somebody's address. If it is going into a README, a blog post, a screenshot or a support ticket, use a range reserved for exactly that purpose — nobody routes them, so no real network is implicated.
| Range | Reserved by | Use for |
|---|---|---|
| 192.0.2.0/24 | RFC 5737 (TEST-NET-1) | Documentation and examples |
| 198.51.100.0/24 | RFC 5737 (TEST-NET-2) | A second distinct example network |
| 203.0.113.0/24 | RFC 5737 (TEST-NET-3) | A third distinct example network |
| 2001:db8::/32 | RFC 3849 | IPv6 documentation |
| 240.0.0.0/4 | RFC 1112 | Reserved — never routable |
Building realistic test fixtures
If you are testing geolocation behaviour, random public addresses give you a spread of countries and network operators without hand-picking them, which is usually the point — hand-picked fixtures tend to encode the author's assumptions about what the data looks like.
Constrain to a block instead when you are testing something that cares about locality: rate limiting per prefix, allow-list matching, or per-ASN quotas.