opn_add_dns_override
Add a local DNS host override (A/AAAA record) to resolve a hostname to a specific IP address, applied immediately. Useful for split-horizon DNS or internal services.
Instructions
Add an Unbound DNS host override (A/AAAA record) and apply immediately.
Use this when you need to create a local DNS record that resolves a hostname to a specific IP address. Useful for split-horizon DNS, internal services, or overriding external DNS for specific hosts.
Changes are applied immediately (Unbound is reconfigured automatically). DNS overrides cannot be auto-reverted — verify settings before calling. Use opn_list_dns_overrides to check existing overrides first.
Parameters:
hostname: the hostname part (e.g. 'myserver')
domain: the domain part (e.g. 'local.lan')
server: the IP address to resolve to (IPv4 or IPv6)
description: optional description
Returns: dict with 'result', 'uuid', 'hostname', 'server', and 'applied' status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hostname | Yes | ||
| domain | Yes | ||
| server | Yes | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||