借助 template
插件可以实现泛域名解析,语法如下:
1 2 3 4 5 6 7 8
| template CLASS TYPE [ZONE...] { match REGEX... answer RR additional RR authority RR rcode CODE fallthrough [ZONE...] }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| .:53 { errors health ready template IN A domain.local { answer "{{ .Name }} 60 IN A 192.168.23.7" fallthrough } forward . 8.8.8.8 cache 30 loop reload loadbalance }
|
References