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

推荐订阅源

MyScale Blog
MyScale Blog
F
Full Disclosure
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
Recent Announcements
Recent Announcements
美团技术团队
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
M
MIT News - Artificial intelligence
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Engineering at Meta
Engineering at Meta
S
Security @ Cisco Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
S
Secure Thoughts
O
OpenAI News
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
About on SuperTechFans
NISL@THU
NISL@THU
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
T
Tailwind CSS Blog
T
The Blog of Author Tim Ferriss
Recent Commits to openclaw:main
Recent Commits to openclaw:main
F
Fortinet All Blogs
B
Blog
IT之家
IT之家
T
Tor Project blog
L
Lohrmann on Cybersecurity
Webroot Blog
Webroot Blog
博客园 - 叶小钗
Simon Willison's Weblog
Simon Willison's Weblog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
量子位
Security Latest
Security Latest
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cisco Blogs
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Last Week in AI
Last Week in AI
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
Cisco Talos Blog
Cisco Talos Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Google DeepMind News
Google DeepMind News
SecWiki News
SecWiki News

plugin on CoreDNS: DNS and Service Discovery

kubernetes log proxyproto rewrite forward clouddns errors grpc_server https https3 template docker auto geoip multisocket nomad dnstap import view ready etcd header loadbalance bind grpc prometheus quic timeouts kubeforward JSON gslb autopath dnssec root tls fanout k8s_cache bufsize k8s_external reload gathersrv meship meshname multicluster acl cache recursor health trace tsig k8s_event redis route53 dns64 transfer 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 mdns wgsd alias chaos whoami lighthouse ens idetcd gravwell amazondns kubernetai redisc unbound on dump pdsql ipin demo example
file
2025-06-13 · via plugin on CoreDNS: DNS and Service Discovery

Description

The file plugin is used for an “old-style” DNS server. It serves from a preloaded file that exists on disk contained RFC 1035 styled data. If the zone file contains signatures (i.e., is signed using DNSSEC), correct DNSSEC answers are returned. Only NSEC is supported! If you use this setup you are responsible for re-signing the zonefile.

Syntax

file DBFILE [ZONES...]
  • DBFILE the database file to read and parse. If the path is relative, the path from the root plugin will be prepended to it.
  • ZONES zones it should be authoritative for. If empty, the zones from the configuration block are used.

If you want to round-robin A and AAAA responses look at the loadbalance plugin.

file DBFILE [ZONES... ] {
    reload DURATION
    fallthrough [ZONES...]
}
  • reload interval to perform a reload of the zone if the SOA version changes. Default is one minute. Value of 0 means to not scan for changes and reload. For example, 30s checks the zonefile every 30 seconds and reloads the zone when serial changes.
  • fallthrough If zone matches and no record can be generated, pass request to the next plugin. If [ZONES…] is omitted, then fallthrough happens for all zones for which the plugin is authoritative. If specific zones are listed (for example in-addr.arpa and ip6.arpa), then only queries for those zones will be subject to fallthrough.

If you need outgoing zone transfers, take a look at the transfer plugin.

Examples

Load the example.org zone from db.example.org and allow transfers to the internet, but send notifies to 10.240.1.1

example.org {
    file db.example.org
    transfer {
        to * 10.240.1.1
    }
}

Where db.example.org would contain RRSets (https://tools.ietf.org/html/rfc7719#section-4) in the (text) presentation format from RFC 1035:

$ORIGIN example.org.
@	3600 IN	SOA sns.dns.icann.org. noc.dns.icann.org. 2017042745 7200 3600 1209600 3600
	3600 IN NS a.iana-servers.net.
	3600 IN NS b.iana-servers.net.

www     IN A     127.0.0.1
        IN AAAA  ::1

Or use a single zone file for multiple zones:

. {
    file example.org.signed example.org example.net
    transfer example.org example.net {
        to * 10.240.1.1
    }
}

Note that if you have a configuration like the following you may run into a problem of the origin not being correctly recognized:

. {
    file db.example.org
}

We omit the origin for the file db.example.org, so this references the zone in the server block, which, in this case, is the root zone. Any contents of db.example.org will then read with that origin set; this may or may not do what you want. It’s better to be explicit here and specify the correct origin. This can be done in two ways:

. {
    file db.example.org example.org
}

Or

example.org {
    file db.example.org
}

See Also

See the loadbalance plugin if you need simple record shuffling. And the transfer plugin for zone transfers. Lastly the root plugin can help you specify the location of the zone files.

See RFC 1035 for more info on how to structure zone files.