SaltDns. AddressFilter
(Salt v1.0.0)
Decides which addresses the server may connect to on a user's behalf (the primary of an AXFR import). Only public, globally routable unicast addresses pass; everything an attacker could use to reach this host's own network is refused:
- IPv4:
0.0.0.0/8(unspecified, "this network"),10.0.0.0/8,100.64/10(carrier-grade NAT),127.0.0.0/8(loopback),169.254.0.0/16(link-local),172.16.0.0/12,192.0.0.0/24,192.0.2.0/24,192.88.99.0/24,192.168.0.0/16,198.18.0.0/15,198.51.100.0/24,203.0.113.0/24(special use and documentation),224.0.0.0/4(multicast) and240.0.0.0/4(reserved, with the broadcast address). - IPv6: only
2000::/3can pass, minus2001::/23(protocol assignments, Teredo, ORCHID),2001:db8::/32and3fff::/20(documentation). Addresses that embed an IPv4 address (IPv4-mapped::ffff:0:0/96, NAT6464:ff9b::/96, 6to42002::/16) are judged by the embedded IPv4 address; the other NAT64 range, loopback, unspecified, unique-localfc00::/7, link-localfe80::/10, site-local, multicast and the IPv4-compatible::/96are refused by not being in2000::/3.
A configured allowlist overrides all of that, for deployments that must import from an internal primary:
config :salt_dns, SaltDns.AddressFilter, allow: ["10.83.0.0/16"]The test environment allows the development stack's network. Addresses are IP literals (tuples or text); names are never resolved here.
Summary
Functions
True when address may be connected to. Never raises.
:ok, or {:error, :invalid_address | :not_public}.
True when address is a public, globally routable unicast address, ignoring the
configured allowlist. For callers that must never be pointed at an internal network,
whatever the deployment allows for other purposes (the HTTP-01 self-check).
Types
Functions
True when address may be connected to. Never raises.
:ok, or {:error, :invalid_address | :not_public}.
True when address is a public, globally routable unicast address, ignoring the
configured allowlist. For callers that must never be pointed at an internal network,
whatever the deployment allows for other purposes (the HTTP-01 self-check).