Since I just saw yet another developer use '1.2.3.4' in an example configuration, a reminder that you MUST NOT use publicly routable addresses that you do not control in your code.

Instead, use one of the available 'TEST-NET' IPv4 or IPv6 ranges documented in RFC 6890, such as;

192.0.2.0/24
198.51.100.0/24
203.0.113.0/24

❌ 1.2.3.4
✅ 192.0.2.4

Pass it on to all of your fellow developers, documentation writers, and so forth.

Full RFC is here;

https://datatracker.ietf.org/doc/rfc6890/

RFC 6890: Special-Purpose IP Address Registries

This memo reiterates the assignment of an IPv4 address block (192.0.0.0/24) to IANA. It also instructs IANA to restructure its IPv4 and IPv6 Special-Purpose Address Registries. Upon restructuring, the aforementioned registries will record all special-purpose address blocks, maintaining a common set of information regarding each address block.

IETF Datatracker

@sindarina

Thanks for the reminder.

I generally use 10.x.x.x, which I know at least can't get out.

A question, though. How can 0.0.0.0/8 reference a single host, and 10.0.0.0/8 reference a whole network?

Are there IP addresses such as 0.0.0.1 that I've never seen?

@drazisil @sindarina the 10/24 net is likely to be used in many cases so better use the officially unriutable test networks.

@drazisil It's one of them "we agree that this is how this works" agreements that was defined in early RFCs, like RFC 1122 from 1989, which updated an earlier RFC from 1981, etc.

https://datatracker.ietf.org/doc/html/rfc1122#section-3.2.1.3

RFC 1122: Requirements for Internet Hosts - Communication Layers

This RFC is an official specification for the Internet community. It incorporates by reference, amends, corrects, and supplements the primary protocol standards documents relating to hosts. [STANDARDS-TRACK]

IETF Datatracker