network

network #

KindAccepts
Value operatorone field and named networks or CIDRs

Tests whether an IP address field belongs to a specific network. Accepts named network identifiers or CIDR notation; multiple networks can be given as a list, matching when the address belongs to any of them.

Parameters #

ParameterTypeDescription
loopbacknamedLoopback addresses (e.g. 127.0.0.1, ::1).
privatenamedRFC 1918 (IPv4) and RFC 4193 (IPv6) private addresses.
publicnamedAny address that is not local or private.
global_unicast / unicastnamedGlobal unicast addresses.
link_local_unicastnamedLink-local unicast addresses.
multicastnamedMulticast addresses.
link_local_multicastnamedLink-local multicast addresses.
interface_local_multicastnamedInterface-local multicast addresses.
unspecifiednamedThe unspecified address (0.0.0.0 or ::).
CIDRstringe.g. 192.168.1.0/24.

Examples #

# Named network
network:
  client_ip: private

# CIDR notation
network:
  source.ip: "192.168.1.0/24"

# Any of several networks
network:
  client_ip: ["private", "loopback"]

Notes #

Inside a per-record sub-chain (e.g. for_each), field names resolve against the current record’s own attributes (file.path, log_level, …); at pipeline level they resolve against the pipeline context through the _ctx. prefix. See the Conditions reference for details.

Edit Edit this page