惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
IT之家
IT之家
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
J
Java Code Geeks
博客园 - 聂微东
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
NISL@THU
NISL@THU
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
L
LINUX DO - 热门话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Fortinet All Blogs
博客园 - Franky
L
Lohrmann on Cybersecurity
S
Secure Thoughts
量子位
V
Vulnerabilities – Threatpost
Last Week in AI
Last Week in AI
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LINUX DO - 最新话题
I
InfoQ
C
CERT Recently Published Vulnerability Notes
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Proofpoint News Feed
G
GRAHAM CLULEY
Cisco Talos Blog
Cisco Talos Blog

Explugins on CoreDNS: DNS and Service Discovery

redis_cache docker kubeforward JSON gslb fanout k8s_cache gathersrv meship meshname multicluster recursor k8s_event redis finalize kubenodes ebpf rrl mysql warnlist git alternate k8s_dns_chaos k8s_gateway netbox mdns wgsd alias lighthouse ens idetcd gravwell amazondns kubernetai redisc unbound on dump pdsql ipin ipecho demo example
records
2020-09-22 · via Explugins on CoreDNS: DNS and Service Discovery

Description

The records plugin is useful for serving zone data that is specified inline in the configuration file. As opposed to the hosts plugin, this plugin supports all record types. Records need to be specified in text representation as specified in RFC 1035. If no TTL is specified in the records, a default TTL of 3600s is assumed.

For negative responses a SOA record should be included in the response, this will only be done when a SOA record is included in the data.

The records plugin uses a simple algorithm for find the correct record(s) to return. This means some more advanced features are currently not available, such as:

  • DNSSEC, if RRSIG records are added they will not be returned in the reply even if the client is capable of handling them. If you need signed replies use the dnssec plugin in conjunction with this one.
  • Wildcards, i.e. *.example.org, will not be detected as a wildcard record.

If you need a more robust implementation you probably want to use the file plugin.

Note the host plugin is configured before records in plugin.cfg, which means that when both are being specified in a server block, the host plugin will get preference.

This plugin can only be used once per Server Block.

Syntax

records [ZONES...] {
    [INLINE]
}
  • ZONES zones it should be authoritative for. If empty, the zones from the configuration block are used.
  • INLINE the resource record that are to be served. These must be specified as the text representation (as specified in RFC 1035) of the record. See the examples below. Each record must be on a single line.

If domain name in INLINE are not fully qualifed each of the ZONES are used as the origin and added to the names.

Examples

Serve a MX records for example.org and give the MX server the name mx1 and address 127.0.0.1.

example.org {
    records {
        @   60  IN SOA ns.icann.org. noc.dns.icann.org. 2020091001 7200 3600 1209600 3600
        @   60  IN MX 10 mx1
        mx1 60  IN A  127.0.0.1
    }
}

Create 2 zones, each will have a MX record. Note that no SOA record has been given. Also note you need to quote the ; in the TXT record’s data to make the parser happy. (A ; is a comment in a RFC 1035 zone file and everything after it will be ignored, hence the need for quoting it here.)

. {
    records example.org example.net {
        mx1 IN MX 10 mx1
        dkim._domainkey.relay 3600 IN TXT "v=DKIM1\; h=sha256\; k=rsa\; s=email\; p=MIIBIj ..."
    }
}

Bugs

DNSSEC, nor wildcards are implemented. The lookup algorithm is pretty basic. Future enhancements could leverage the code from the file plugin to make more compliant with the DNS specification.

See Also

See the hosts’ plugin documentation if you just need to return address records. Use the reload plugin to reload the contents of these inline records automatically when they are changed. The dnssec plugin can be used to sign replies. See RFC 1035 and subsequent RFCs defining new record types for the text representation that must be used in this plugin. Note RFC 3597 (Handling of Unknown DNS Resource Record) syntax is also supported.

Use the file plugin for a more fully featured DNS implementation (including DNSSEC).