[![CoreDNS](https://coredns.io/images/CoreDNS_Colour_Horizontal.png)](https://coredns.io) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/coredns/coredns) [![Build Status](https://img.shields.io/travis/coredns/coredns/master.svg?label=build)](https://travis-ci.org/coredns/coredns) [![fuzzit](https://app.fuzzit.dev/badge?org_id=coredns&branch=master)](https://fuzzit.dev) [![Code Coverage](https://img.shields.io/codecov/c/github/coredns/coredns/master.svg)](https://codecov.io/github/coredns/coredns?branch=master) [![Docker Pulls](https://img.shields.io/docker/pulls/coredns/coredns.svg)](https://hub.docker.com/r/coredns/coredns) [![Go Report Card](https://goreportcard.com/badge/github.com/coredns/coredns)](https://goreportcard.com/report/coredns/coredns) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1250/badge)](https://bestpractices.coreinfrastructure.org/projects/1250) CoreDNS is a DNS server/forwarder, written in Go, that chains [plugins](https://coredns.io/plugins). Each plugin performs a (DNS) function. CoreDNS is a [Cloud Native Computing Foundation](https://cncf.io) graduated project. CoreDNS is a fast and flexible DNS server. The key word here is *flexible*: with CoreDNS you are able to do what you want with your DNS data by utilizing plugins. If some functionality is not provided out of the box you can add it by [writing a plugin](https://coredns.io/explugins). CoreDNS can listen for DNS requests coming in over UDP/TCP (go'old DNS), TLS ([RFC 7858](https://tools.ietf.org/html/rfc7858)), also called DoT, DNS over HTTP/2 - DoH - ([RFC 8484](https://tools.ietf.org/html/rfc8484)) and [gRPC](https://grpc.io) (not a standard). Currently CoreDNS is able to: * Serve zone data from a file; both DNSSEC (NSEC only) and DNS are supported (*file* and *auto*). * Retrieve zone data from primaries, i.e., act as a secondary server (AXFR only) (*secondary*). * Sign zone data on-the-fly (*dnssec*). * Load balancing of responses (*loadbalance*). * Allow for zone transfers, i.e., act as a primary server (*file*). * Automatically load zone files from disk (*auto*). * Caching of DNS responses (*cache*). * Use etcd as a backend (replacing [SkyDNS](https://github.com/skynetservices/skydns)) (*etcd*). * Use k8s (kubernetes) as a backend (*kubernetes*). * Serve as a proxy to forward queries to some other (recursive) nameserver (*forward*). * Provide metrics (by using Prometheus) (*metrics*). * Provide query (*log*) and error (*errors*) logging. * Integrate with cloud providers (*route53*). * Support the CH class: `version.bind` and friends (*chaos*). * Support the RFC 5001 DNS name server identifier (NSID) option (*nsid*). * Profiling support (*pprof*). * Rewrite queries (qtype, qclass and qname) (*rewrite* and *template*). * Block ANY queries (*any*). And more. Each of the plugins is documented. See [coredns.io/plugins](https://coredns.io/plugins) for all in-tree plugins, and [coredns.io/explugins](https://coredns.io/explugins) for all out-of-tree plugins. ## Compilation from Source To compile CoreDNS, we assume you have a working Go setup. See various tutorials if you don’t have that already configured. First, make sure your golang version is 1.12 or higher as `go mod` support is needed. See [here](https://github.com/golang/go/wiki/Modules) for `go mod` details. Then, check out the project and run `make` to compile the binary: ~~~ $ git clone https://github.com/coredns/coredns $ cd coredns $ make ~~~ This should yield a `coredns` binary. ## Compilation with Docker CoreDNS requires Go to compile. However, if you already have docker installed and prefer not to setup a Go environment, you could build CoreDNS easily: ``` $ docker run --rm -i -t -v $PWD:/v -w /v golang:1.12 make ``` The above command alone will have `coredns` binary generated. ## Examples When starting CoreDNS without any configuration, it loads the [*whoami*](https://coredns.io/plugins/whoami) and [*log*](https://coredns.io/plugins/log) plugins and starts listening on port 53 (override with `-dns.port`), it should show the following: ~~~ txt .:53 CoreDNS-1.6.6 linux/amd64, go1.13.5, aa8c32 ~~~ Any query sent to port 53 should return some information; your sending address, port and protocol used. The query should also be logged to standard output. If you have a Corefile without a port number specified it will, by default, use port 53, but you can override the port with the `-dns.port` flag: `coredns -dns.port 1053`, runs the server on port 1053. Start a simple proxy. You'll need to be root to start listening on port 53. `Corefile` contains: ~~~ corefile .:53 { forward . 8.8.8.8:53 log } ~~~ Start CoreDNS and then query on that port (53). The query should be forwarded to 8.8.8.8 and the response will be returned. Each query should also show up in the log which is printed on standard output. To serve the (NSEC) DNSSEC-signed `example.org` on port 1053, with errors and logging sent to standard output. Allow zone transfers to everybody, but specifically mention 1 IP address so that CoreDNS can send notifies to it. ~~~ txt example.org:1053 { file /var/lib/coredns/example.org.signed { transfer to * transfer to 2001:500:8f::53 } errors log } ~~~ Serve `example.org` on port 1053, but forward everything that does *not* match `example.org` to a recursive nameserver *and* rewrite ANY queries to HINFO. ~~~ txt example.org:1053 { file /var/lib/coredns/example.org.signed { transfer to * transfer to 2001:500:8f::53 } errors log } . { any forward . 8.8.8.8:53 errors log } ~~~ IP addresses are also allowed. They are automatically converted to reverse zones: ~~~ corefile 10.0.0.0/24 { whoami } ~~~ Means you are authoritative for `0.0.10.in-addr.arpa.`. This also works for IPv6 addresses. If for some reason you want to serve a zone named `10.0.0.0/24` add the closing dot: `10.0.0.0/24.` as this also stops the conversion. This even works for CIDR (See RFC 1518 and 1519) addressing, i.e. `10.0.0.0/25`, CoreDNS will then check if the `in-addr` request falls in the correct range. Listening on TLS (DoT) and for gRPC? Use: ~~~ corefile tls://example.org grpc://example.org { whoami } ~~~ And for DNS over HTTP/2 (DoH) use: ~~~ corefile https://example.org { whoami } ~~~ Specifying ports works in the same way: ~~~ txt grpc://example.org:1443 { # ... } ~~~ When no transport protocol is specified the default `dns://` is assumed. ## Community We're most active on Github (and Slack): - Github: - Slack: #coredns on More resources can be found: - Website: - Blog: - Twitter: [@corednsio](https://twitter.com/corednsio) - Mailing list/group: (not very active) ## Contribution guidelines If you want to contribute to CoreDNS, be sure to review the [contribution guidelines](CONTRIBUTING.md). ## Deployment Examples for deployment via systemd and other use cases can be found in the [deployment repository](https://github.com/coredns/deployment). ## Deprecation Policy When there is a backwards incompatible change in CoreDNS the following process is followed: * Release x.y.z: Announce that in the next release we will make backward incompatible changes. * Release x.y+1.0: Increase the minor version and set the patch version to 0. Make the changes, but allow the old configuration to be parsed. I.e. CoreDNS will start from an unchanged Corefile. * Release x.y+1.1: Increase the patch version to 1. Remove the lenient parsing, so CoreDNS will not start if those features are still used. E.g. 1.3.1 announce a change. 1.4.0 a new release with the change but backward compatible config. And finally 1.4.1 that removes the config workarounds. ## Security ### Security Audit A third party security audit was performed by Cure53, you can see the full report [here](https://coredns.io/assets/DNS-01-report.pdf). ### Reporting security vulnerabilities If you find a security vulnerability or any security related issues, please DO NOT file a public issue, instead send your report privately to `security@coredns.io`. Security reports are greatly appreciated and we will publicly thank you for it. Please consult [security vulnerability disclosures and security fix and release process document](https://github.com/coredns/coredns/blob/master/SECURITY.md) Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-09-30[@astrojs/image] fixes a bug in dev when <Image /> is used with no ↵Gravatar Tony Sullivan 5-6/+30
transformation props (#4933) * fix: return the original file in dev if no image transforms were used * chore: add changeset
2022-09-30Update seven-shrimps-hope.md (#4934)Gravatar Tony Sullivan 1-1/+1
Upgrading the image caching feature as a minor release
2022-09-30[ci] update lockfile (#4927)Gravatar Fred K. Bot 1-280/+280
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-30Move module declarations for Markdown and MDX so they're available ↵Gravatar Erika 4-35/+46
everywhere (#4928) * Move module declarations for Markdown and MDX to the proper file so they're globally available * Remove tsconfig.json depending on client.d.ts unnecessarily
2022-09-29[ci] formatGravatar tony-sull 4-17/+29
2022-09-29[@astrojs/image] adding caching support for SSG builds (#4909)Gravatar Tony Sullivan 8-10/+240
* adds a caching feature for SSG builds * chore: add changeset * nit: eslint fix * chore: add readme docs for caching * adding basic test coverage for cached images
2022-09-29[ci] release (#4903)astro@1.4.0@astrojs/vue@1.1.0@astrojs/vercel@2.1.0@astrojs/telemetry@1.0.1@astrojs/tailwind@2.0.2@astrojs/svelte@1.0.1@astrojs/rss@1.0.2@astrojs/preact@1.1.1@astrojs/node@1.1.0@astrojs/netlify@1.1.0@astrojs/mdx@0.11.3@astrojs/markdown-remark@1.1.3@astrojs/image@0.8.1@astrojs/deno@1.1.0@astrojs/cloudflare@2.1.0Gravatar Fred K. Bot 65-235/+512
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-29[ci] update lockfile (#4899)Gravatar Fred K. Bot 1-735/+718
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-09-29[ci] formatGravatar matthewp 1-1/+3
2022-09-29fix trailing slash mismatch in dev vs build in docs example (#4912)Gravatar Rishi Raj Jain 1-1/+1
2022-09-29[ci] formatGravatar bluwy 1-1/+1
2022-09-29Support Vue JSX (#4897)Gravatar Bjorn Lu 12-5/+329
Co-authored-by: Dan Jutan <danjutan@gmail.com>
2022-09-28[ci] formatGravatar matthewp 1-8/+4
2022-09-28Fix CSS ordering between imported and Astro styles (#4907)Gravatar Matthew Phillips 12-7/+218
* Fix CSS ordering between imported and Astro styles * Fix linting errors * Add changeset and upgrade compiler version * Update test to reflect shared styles placed before page styles
2022-09-28[ci] formatGravatar matthewp 23-137/+127
2022-09-28Astro.cookies implementation (#4876)Gravatar Matthew Phillips 32-29/+943
* Astro.cookies implementation * Remove unused var * Fix build * Add a changesetp * Remove spoken-word expires
2022-09-28Fix: let Squoosh default image quality internally (#4906)Gravatar Tony Sullivan 5-11/+20
* removes our quality defaults, allowing Squoosh format-specific defaults to be used * chore: add changeset
2022-09-28Update README.md (#4898)Gravatar stijlmassi 1-2/+3
* Update README.md In the astro.config.mjs: defineConfig() was missing. * Update packages/integrations/tailwind/README.md Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com> Co-authored-by: Fred K. Schott <fkschott@gmail.com> Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2022-09-28Fix test (#4904)Gravatar Bjorn Lu 2-1/+7
2022-09-28[ci] formatGravatar FredKSchott 2-4/+4
2022-09-28redesign basics template (#4879)Gravatar Fred K. Schott 3-88/+34
2022-09-28[ci] formatGravatar bluwy 1-2/+2
2022-09-28Remove shamefully-hoist (#4842)Gravatar Bjorn Lu 104-527/+768
2022-09-28[ci] formatGravatar matthewp 4-14/+16
2022-09-28Hoist hydration script out of slot templates (#4891)Gravatar Matthew Phillips 13-43/+165
* Hoist hydration script out of slot templates * Add changeset * Fix HTML components * Mark as html string
2022-09-28Ensure head content rendered once with lazy layouts (#4892)Gravatar Matthew Phillips 9-3/+59
* Ensure head content rendered once with lazy layouts * Add changeset
2022-09-27fixed typing (#4893)Gravatar tweenietomatoes 1-1/+1
2022-09-27[ci] release (#4846)create-astro@1.1.0astro@1.3.1@astrojs/webapi@1.1.0@astrojs/vercel@2.0.1@astrojs/mdx@0.11.2@astrojs/image@0.8.0Gravatar Fred K. Bot 60-185/+169
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-27fix: post API routes in SSG should warn or error during dev mode (#4878)Gravatar Rishi Raj Jain 3-2/+17
* Update endpoint.ts * add warning for post routes called when output is not server * Update famous-camels-study.md * Update endpoint.ts * If not get * Resolve changes
2022-09-27docs: Fix links to Tailwind examples (#4883)Gravatar Deanmv 1-1/+1
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-09-27Set SSR target webworker for Vercel edge (#4884)Gravatar Bjorn Lu 2-0/+6
2022-09-27[ci] update lockfile (#4885)Gravatar Fred K. Bot 1-86/+79
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-26[ci] formatGravatar bholmesdev 3-23/+19
2022-09-26Fix: correctly transform `import.meta.env.*` in MDX (#4858)Gravatar Ben Holmes 12-233/+454
* fix: serialize route pattern for Netlify edge Co-authored-by: Jackie Macharia <jackiewmacharia> * fix: escape import.meta.env in MDX compiler output * test: env vars in mdx * chore: changeset * deps: estree-util-visit, @types/estree * feat: inject import.meta.env w/ recma * feat: pull importMetaEnv from vite + astro configs * test: `import.meta.env` in JSX * fix: lockfile * chore: update changeset * fix: remove stray stashed commit
2022-09-26Change negative lookbehind to lookahead (#4866)Gravatar Rishi Raj Jain 1-1/+1
2022-09-26add double check on astro file return type to display more human readable ↵Gravatar Steven Yung 6-2/+61
error (#4857)
2022-09-26[ci] update lockfile (#4862)Gravatar Fred K. Bot 1-81/+81
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-09-26fix: Script with innerHTML not working on Safari (#4861)Gravatar Rishi Raj Jain 3-3/+10
* fix: Script with innerHTML not working on Safari * Update cool-camels-tease.md
2022-09-26Prevent /undefined catch-all routes in dev (#4873)Gravatar Bjorn Lu 6-9/+66
2022-09-26fix: 🐛 BUG: class:list directive adding class attribute when undefined ↵Gravatar Rishi Raj Jain 2-2/+9
(#4867) * Update hydration.ts * Create lucky-comics-bow.md
2022-09-26docs: Standardize common integration READMEs (#4874)Gravatar Jake Strawn 7-6/+66
2022-09-26docs: Update references to support channel in Discord. (#4872)Gravatar Jake Strawn 12-12/+12
2022-09-26[ci] formatGravatar bluwy 1-1/+1
2022-09-26fix: "chunks" directory appears in build output, if custom modules are ↵Gravatar Rishi Raj Jain 2-6/+34
imported in Astro files (#4868)
2022-09-23[ci] formatGravatar matthewp 1-1/+1
2022-09-23Define toStringTag another way (#4855)Gravatar Matthew Phillips 2-4/+12
* Define toStringTag another way * Adding a changeset
2022-09-23update SSR example to match recent change on Astro API Context (#4854)Gravatar Steven Yung 2-4/+6
2022-09-23[ci] update lockfile (#4852)Gravatar Fred K. Bot 1-373/+402
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>