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

推荐订阅源

月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
IT之家
IT之家
Cyberwarzone
Cyberwarzone
T
Troy Hunt's Blog
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
G
GRAHAM CLULEY
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 叶小钗
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
The Hacker News
The Hacker News
Jina AI
Jina AI
T
Tor Project blog
V
Vulnerabilities – Threatpost
酷 壳 – CoolShell
酷 壳 – CoolShell
Spread Privacy
Spread Privacy
博客园_首页
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Simon Willison's Weblog
Simon Willison's Weblog
Security Latest
Security Latest
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
I
Intezer
The Cloudflare Blog
Cisco Talos Blog
Cisco Talos Blog
SecWiki News
SecWiki News
博客园 - 【当耐特】
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
L
Lohrmann on Cybersecurity
Scott Helme
Scott Helme
Google Online Security Blog
Google Online Security Blog
量子位
The Last Watchdog
The Last Watchdog
AI
AI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security Affairs
P
Palo Alto Networks Blog
S
Secure Thoughts
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Attack and Defense Labs
Attack and Defense Labs

Plugin on CoreDNS: DNS and Service Discovery

kubernetes log proxyproto rewrite forward clouddns errors grpc_server https https3 docker auto geoip multisocket nomad dnstap import ready etcd header loadbalance bind grpc file prometheus quic kubeforward JSON gslb autopath dnssec root fanout k8s_cache bufsize k8s_external reload gathersrv meship meshname multicluster acl cache recursor health trace k8s_event redis route53 dns64 finalize kubenodes ebpf rrl secondary mysql warnlist loop minimal sign azure git local any cancel debug erratic metadata nsid pprof alternate k8s_dns_chaos records k8s_gateway hosts netbox wgsd alias chaos whoami lighthouse ens idetcd gravwell amazondns kubernetai redisc unbound on dump pdsql ipin Logging with dnstap demo example When Should Plugins be External? Add External Plugins How Queries Are Processed in CoreDNS How to Add Plugins to CoreDNS Writing Plugins for CoreDNS
mdns
2020-06-17 · via Plugin on CoreDNS: DNS and Service Discovery

Description

This plugin reads mDNS records from the local network and responds to queries based on those records.

Useful for providing mDNS records to non-mDNS-aware applications by making them accessible through a standard DNS server.

Syntax

mdns example.com [minimum SRV records] [filter text] [bind address]

Examples

As a prerequisite to using this plugin, there must be systems on the local network broadcasting mDNS records. Note that the .local domain will be replaced with the configured domain. For example, test.local would become test.example.com using the configuration below.

Specify the domain for the records.

example.com {
	mdns example.com
}

And test with dig:

dig @localhost baremetal-test-extra-1.example.com

;; ANSWER SECTION:
baremetal-test-extra-1.example.com. 60 IN A   12.0.0.24
baremetal-test-extra-1.example.com. 60 IN AAAA fe80::f816:3eff:fe49:19b3

If minimum SRV records is specified in the configuration, the plugin will wait until it has at least that many SRV records before responding with any of them. minimum SRV records defaults to 3.

example.com {
    mdns example.com 2
}

This would mean that at least two SRV records of a given type would need to be present for any SRV records to be returned. If only one record is found, any requests for that type of SRV record would receive no results.

If filter text is specified in the configuration, the plugin will ignore any mDNS records that do not include the specified text in the service name. This allows the plugin to be used in environments where there may be mDNS services advertised that are not intended for use with it. When filter text is not set, all records will be processed.

example.com {
    mdns example.com 3 my-id
}

This configuration would ignore any mDNS records that do not contain the string “my-id” in their service name.

If bind address is specified in the configuration, the plugin will only send mDNS traffic to the associated interface. This prevents sending multicast packets on interfaces where that may not be desirable. To use bind address without setting a filter, set filter text to “”.

example.com {
    mdns example.com 3 "" 192.168.1.1
}

This configuration will only send multicast packets to the interface assigned the 192.168.1.1 address. The interface lookup is dynamic each time an mDNS query is sent, so if the address moves to a different interface the plugin will automatically switch to the new one.