recursor - coredns simple ip addresses resolver
recursor
- determines IP addresses:
- using defined static IP addresses
- or resolves given hostname using an external resolver
Config Syntax
Corefile
recursor [json-config-file-path] [{
[verbose true|false]
resolver resolver-name {
urls udp://10.0.0.1:53 udp://10.0.0.2:53
[timeout_ms 10]
}
alias alias1.example.svc. {
[ips 10.1.1.1 10.1.1.2]
[hosts www.example.org www.example.com]
[ttl 5]
[resolver_name resolver-name]
}
alias alias2.example.svc. {
[hosts www.example.org www.example.com]
# system default resolver
}
}]
External JSON
{
"verbose": true,
"resolvers": {
"resolver-name": {
"urls": ["udp://10.0.0.1:53","udp://10.0.0.2:53"],
"timeout_ms": 10
}
},
"aliases": {
"alias1.example.svc.": {
"ips": ["10.1.1.1","10.1.1.2"],
"hosts": ["www.example.org","www.example.com"],
"ttl": 5,
"resolver_name": "resolver-name"
},
"alias2.example.svc.": {
"hosts": ["www.example.org","www.example.com"],
"resolver_name": "default"
}
}
}
Try it
Look at some examples.
Helpful commands:
dig alias1.example.svc @127.0.0.1 -p 1053
nslookup -port=1053 -debug -type=A alias2.example.svc 127.0.0.1
TODO