Remote Servers¶
RemoteServersBlock
pydantic-model
¶
Bases: BindBaseModel
Remote servers block for BIND9 configuration.
Defines a list of servers to be used by primary and secondary zones. This list can be referenced by parental-agents, primaries, and also-notify.
Grammar:
remote-servers <string> [ port <integer> ]
[ source ( <ipv4_address> | * ) ]
[ source-v6 ( <ipv6_address> | * ) ]
{
( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] )
[ key <string> ] [ tls <string> ];
...
};
Show JSON schema:
{
"$defs": {
"RemoteServerEntry": {
"description": "Single server entry in a remote-servers block.\n\nCan be one of:\n1. Server list reference (string)\n2. IPv4 address with optional port\n3. IPv6 address with optional port\n\nGrammar:\n```\n( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] )\n[ key <string> ] [ tls <string> ];\n```",
"properties": {
"comment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional comment for this block",
"title": "Comment"
},
"server": {
"anyOf": [
{
"type": "string"
},
{
"format": "ipv4",
"type": "string"
},
{
"format": "ipv6",
"type": "string"
}
],
"description": "Server specification. Can be:\n- Server list name (string)\n- IPv4 address (e.g., 192.0.2.1)\n- IPv6 address (e.g., 2001:db8::1)",
"title": "Server"
},
"port": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Port number for this specific server.\nOverrides the block-level port if specified.",
"title": "Port"
},
"key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "TSIG key for authentication with this server",
"title": "Key"
},
"tls": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "TLS configuration name for encrypted zone transfers.\nWarning: Without remote-hostname or ca-file in tls configuration,\nTLS is not authenticated (Opportunistic TLS).",
"title": "Tls"
}
},
"required": [
"server"
],
"title": "RemoteServerEntry",
"type": "object"
}
},
"description": "Remote servers block for BIND9 configuration.\n\nDefines a list of servers to be used by primary and secondary zones.\nThis list can be referenced by parental-agents, primaries, and also-notify.\n\nGrammar:\n```\nremote-servers <string> [ port <integer> ]\n [ source ( <ipv4_address> | * ) ]\n [ source-v6 ( <ipv6_address> | * ) ]\n {\n ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] )\n [ key <string> ] [ tls <string> ];\n ...\n };\n```",
"properties": {
"comment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional comment for this block",
"title": "Comment"
},
"name": {
"description": "Name of this remote servers list for reference",
"title": "Name",
"type": "string"
},
"port": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Default port for all servers in this list.\nCan be overridden by individual server port.",
"title": "Port"
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"format": "ipv4",
"type": "string"
},
{
"const": "*",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Source IPv4 address for outgoing connections.\n* means use any IPv4 interface address.",
"title": "Source"
},
"source_v6": {
"anyOf": [
{
"type": "string"
},
{
"format": "ipv6",
"type": "string"
},
{
"const": "*",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Source IPv6 address for outgoing connections.\n* means use any IPv6 interface address.",
"title": "Source V6"
},
"servers": {
"description": "List of servers in this remote servers list",
"items": {
"$ref": "#/$defs/RemoteServerEntry"
},
"title": "Servers",
"type": "array"
}
},
"required": [
"name"
],
"title": "RemoteServersBlock",
"type": "object"
}
Fields:
-
comment(string_BIND | None) -
name(string_BIND) -
port(port_BIND | None) -
source(ip_v4_address_BIND | Literal['*'] | None) -
source_v6(ip_v6_address_BIND | Literal['*'] | None) -
servers(list[RemoteServerEntry])
Validators:
-
validate_block
port
pydantic-field
¶
port: port_BIND | None = None
Default port for all servers in this list. Can be overridden by individual server port.
source
pydantic-field
¶
source: ip_v4_address_BIND | Literal['*'] | None = None
Source IPv4 address for outgoing connections. * means use any IPv4 interface address.
source_v6
pydantic-field
¶
source_v6: ip_v6_address_BIND | Literal['*'] | None = None
Source IPv6 address for outgoing connections. * means use any IPv6 interface address.
servers
pydantic-field
¶
servers: list[RemoteServerEntry]
List of servers in this remote servers list
RemoteServerEntry
pydantic-model
¶
Bases: BindBaseModel
Single server entry in a remote-servers block.
Can be one of: 1. Server list reference (string) 2. IPv4 address with optional port 3. IPv6 address with optional port
Grammar:
( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] )
[ key <string> ] [ tls <string> ];
Show JSON schema:
{
"description": "Single server entry in a remote-servers block.\n\nCan be one of:\n1. Server list reference (string)\n2. IPv4 address with optional port\n3. IPv6 address with optional port\n\nGrammar:\n```\n( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] )\n[ key <string> ] [ tls <string> ];\n```",
"properties": {
"comment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional comment for this block",
"title": "Comment"
},
"server": {
"anyOf": [
{
"type": "string"
},
{
"format": "ipv4",
"type": "string"
},
{
"format": "ipv6",
"type": "string"
}
],
"description": "Server specification. Can be:\n- Server list name (string)\n- IPv4 address (e.g., 192.0.2.1)\n- IPv6 address (e.g., 2001:db8::1)",
"title": "Server"
},
"port": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Port number for this specific server.\nOverrides the block-level port if specified.",
"title": "Port"
},
"key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "TSIG key for authentication with this server",
"title": "Key"
},
"tls": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "TLS configuration name for encrypted zone transfers.\nWarning: Without remote-hostname or ca-file in tls configuration,\nTLS is not authenticated (Opportunistic TLS).",
"title": "Tls"
}
},
"required": [
"server"
],
"title": "RemoteServerEntry",
"type": "object"
}
Fields:
-
comment(string_BIND | None) -
server(string_BIND | ip_v4_address_BIND | ip_v6_address_BIND) -
port(port_BIND | None) -
key(server_key_BIND | None) -
tls(tls_id_BIND | None)
Validators:
server
pydantic-field
¶
server: (
string_BIND | ip_v4_address_BIND | ip_v6_address_BIND
)
Server specification. Can be: - Server list name (string) - IPv4 address (e.g., 192.0.2.1) - IPv6 address (e.g., 2001:db8::1)
port
pydantic-field
¶
port: port_BIND | None = None
Port number for this specific server. Overrides the block-level port if specified.
key
pydantic-field
¶
key: server_key_BIND | None = None
TSIG key for authentication with this server
tls
pydantic-field
¶
tls: tls_id_BIND | None = None
TLS configuration name for encrypted zone transfers. Warning: Without remote-hostname or ca-file in tls configuration, TLS is not authenticated (Opportunistic TLS).
validate_server_type
pydantic-validator
¶
validate_server_type() -> RemoteServerEntry
Validate server type and port compatibility.