Inside network
8.8.8.8 in 8.8.8.0/24
Returns yes because 8.8.8.8 is between 8.8.8.0 and 8.8.8.255.
Check inside example
Network tool
Check whether an IPv4 or IPv6 address belongs to a CIDR network, such as a range in a firewall allowlist or a provider’s address list.
Result: inside network.
Reference
Advertisement
Examples
Inside network
8.8.8.8 in 8.8.8.0/24
Returns yes because 8.8.8.8 is between 8.8.8.0 and 8.8.8.255.
Check inside example
Outside network
8.8.9.1 in 8.8.8.0/24
Returns no because the address is outside the calculated range.
Check outside example
Boundaries
The IP address and CIDR network must use the same IP version. This tool checks mathematical range membership only; it does not verify ownership, reputation, geolocation, or whether traffic is currently routed from that network. The CIDR notation guide explains the slash prefix.
Build the same kind of checks into your code using these documented libraries.
Standard-library IPv4 and IPv6 parsing, networks and membership checks.
Standard-library address and prefix types with Contains and Overlaps methods.
A third-party library for IPv4/IPv6 parsing and CIDR matching.
Next steps
Advertisement