Random IP Addresses for Testing: Public, Private, IPv4 & IPv6
Logs, firewalls, analytics pipelines and rate limiters all process IP addresses. To test them you need realistic IPs from the right ranges โ without accidentally using reserved or real infrastructure addresses.
Private vs public ranges
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. Everything else routable is public. Avoid loopback (127.0.0.0/8), link-local (169.254.0.0/16) and carrier-grade NAT (100.64.0.0/10) in โpublicโ test data.
IPv6 basics
IPv6 addresses are 128 bits written as eight hex groups. Global unicast addresses start in 2000::/3; unique-local (private) addresses use fd00::/8. Test that your code handles compressed notation (::) and storage length.
What to test
- Parsing and validating both versions.
- CIDR matching in allow/deny lists.
- Geo-IP fallbacks for private ranges.
- Anonymisation (truncating the last octet) for privacy compliance.
Pro tips
- Never scan or probe generated public IPs โ they may belong to real organisations.
- For documentation, RFC 5737 ranges (192.0.2.0/24) are ideal.
- Export CSV to replay synthetic traffic in your SIEM.