List of Random IP Addresses for Testing and Development
In this article
Developers, network testers, and cybersecurity professionals use random IP addresses to simulate traffic, test configurations, or validate security rules. Use this list to quickly populate logs, firewall rules, or scripts without relying on real user data.
Public IPv4 Addresses for Safe Simulation
These addresses are non-routable or reserved for documentation and testing. They will not reach real devices or services on the internet. Use them in logs, tutorials, or configuration examples where realistic-looking IPs are needed without privacy or security risk.
- 192.0.2.1 – Part of the 192.0.2.0/24 range reserved for tutorials and examples (RFC 5737). Use this for sample firewall rules, access logs, or network diagrams. It appears as a valid public IP but is never assigned to live networks.
- 198.51.100.23 – From the 198.51.100.0/24 block, also set aside for documentation (RFC 5737). Ideal for illustrating subnetting, routing tables, or NAT configurations. Replace real IPs in guides with this to prevent accidental exposure.
- 203.0.113.45 – Another documentation-only address from RFC 5737. Use in training materials or test scripts where the appearance of realism matters but actual connectivity is not needed.
- 203.0.113.198 – Same block as above, useful when multiple distinct but safe IPs are required in one example. Assign to different virtual hosts or services in a mock environment.
- 192.199.76.12 – A randomly selected public IP not assigned to any organization. Always verify unallocated status using a WHOIS lookup before use in production-like settings. This address is illustrative and must be confirmed free of registration.
Private and Loopback IPs for Local Testing
These addresses are defined in RFC 1918 and RFC 1122 for internal use only. They are never visible on the public internet and are ideal for simulating internal network behavior, server responses, or application logic.
- 10.1.34.201 – From the 10.0.0.0/8 private range. Use this for internal load balancer testing, Docker container networking, or mock API responses. Subnet freely—e.g., 10.x.x.x with /8 to /30 masks—without conflict.
- 172.16.8.105 – Within the 172.16.0.0/12 private block. Suitable for multi-tier application testing (web, app, database layers). Assign sequentially: 172.16.8.101 for web, 102 for app, 103 for DB.
- 172.30.255.11 – Another 172.16.0.0/12 address. Use in virtual machine clusters or Kubernetes pod networking where isolation from public traffic is required.
- 192.168.4.50 – From the 192.168.0.0/16 private range. Common in home and small office networks. Use this in scripts that emulate NAT traversal or DHCP responses.
- 127.0.0.1 – The loopback address, always points to the local machine. Use in unit tests, health checks, or service discovery logic to simulate local service binding. Never logs to external systems.
- 127.12.34.56 – Any 127.x.x.x address routes to localhost. Valid for testing error handling when external calls fail. Some systems log these during fallback attempts.
Randomized IPs from Unallocated Blocks
These addresses come from ranges not currently assigned by IANA or regional registries. They are safe for simulation but require verification before use in environments that might perform reverse DNS or geolocation lookups.
- 240.0.0.10 – From the 240.0.0.0/4 range, historically reserved for future use. Not routed on public internet. Use in stress-testing packet filters or intrusion detection systems with edge-case values.
- 192.88.99.3 – Formerly used for IPv6 transition (6to4 relay, now deprecated). Still not assigned for general use. Acceptable in legacy system testing but avoid in new designs.
- 198.18.0.100 – Part of the 198.18.0.0/15 range reserved for network benchmarking (RFC 2544). Use in performance testing tools to simulate traffic between test endpoints. Valid for internal throughput measurement only.
- 198.19.255.200 – Same benchmarking block. Assign as source or destination in packet generation tools like iperf3 or Scapy without risk of external routing.
- 100.64.0.1 – From the Shared Address Space (RFC 6598), used in carrier-grade NAT. Appears in logs from mobile providers. Use in log parsing tests where CGNAT IPs must be identified.
- 100.127.255.254 – Upper end of the 100.64.0.0/10 range. Simulates real-world carrier NAT behavior in logging or analytics systems.
How to Generate Your Own Random IPs Safely
Create custom IP lists without risking real addresses. Follow these methods to generate IPs that stay within safe, non-routable ranges.
Use Python to generate random private IPs:
import random
def random_private_ip():
# Choose from private ranges
choice = random.randint(1, 3)
if choice == 1:
return f"10.{random.randint(0, 255)}.{random.randint(0, 255)}.{random.randint(1, 254)}"
elif choice == 2:
return f"172.{random.randint(16, 31)}.{random.randint(0, 255)}.{random.randint(1, 254)}"
else:
return f"192.168.{random.randint(0, 255)}.{random.randint(1, 254)}"
Generate 10 random private IPs
for _ in range(10):
print(random_private_ip())
For public-looking but safe IPs, restrict output to 192.0.2.x, 198.51.100.x, or 203.0.113.x ranges.
In Bash, use this command to generate a single random private IP in the 10.x range:
echo "10.$((RANDOM % 256)).$((RANDOM % 256)).$((RANDOM % 254 + 1))"
Always avoid 0 and 255 in the last octet to prevent conflicts with network and broadcast addresses.
When scripting log generators, use these patterns to simulate realistic variation without privacy exposure.
Verify any generated IP is not in active use with a WHOIS lookup or IANA registry check before deployment in shared environments.