Tags make it possible to divide client source addresses into categories (tags), and use local-zone and local-data information for these specific tags.
tags was introduced in Unbound 1.5.10.
IMPORTANT: The tags on the netblocks and local-zones are stored in bitmaps, it is therefore advised to keep the number of tags low.
define-tags: "malware gambling"
NOTE: This defines two tags, one for domains containing malware, and one for domains of gambling sites.
access-control-tag: 10.0.1.0/24 "malware" access-control-tag: 10.0.2.0/24 "malware" access-control-tag: 10.0.3.0/24 "gambling" access-control-tag: 10.0.4.0/24 "malware gambling"
NOTE: It is possible to add multiple tags to an access-control element.
local-zone: malwarehere.example refuse local-zone: somegamblingsite.example static local-zone: matchestwotags.example transparent local-zone: notags.example inform local-zone-tag: malwarehere.example malware local-zone-tag: somegamblingsite.example malware local-zone-tag: matchestwotags.example "malware gambling"
NOTE: The local-zone type can be:
NOTE: A local-zone-tag can have multiple tags.
access-control-tag-action: 10.0.1.0/24 "malware" refuse access-control-tag-action: 10.0.2.0/24 "malware" deny
NOTE: This sets the local-zone type depending on the client address and tag combination.
access-control-tag-data: 10.0.4.0/24 "gambling" "A 127.0.0.1"
NOTE: This sets the use of local-data RRs for some specific client address/tag match.
NOTE: Sometimes you might want to override a local-zone type for a specific netblock, regardless the type configured for tagged and untagged localzones, and regardless the type configured using access-control-tag action.