1
0
Fork 0
 
 
 
Go to file
Ambrose Chua ab35299432
Merge pull request #5 from section-io/section-v1.6.9
Update modules to match CoreDNS v1.6.9
2020-04-25 01:25:06 +08:00
LICENSE Initial commit 2017-08-20 09:36:37 +08:00
README.md Update README.md 2017-12-24 05:30:54 +08:00
alias.go Flatten CNAME records beyond first 2019-10-18 15:45:39 +11:00
go.mod Update modules to match CoreDNS v1.6.9 2020-04-22 11:25:48 +10:00
setup.go Update moved package name 2019-10-18 09:53:48 +11:00

README.md

alias

The alias plugin eliminates CNAME records from zone apex by making the subsequent resolved records look like they belong to the zone apex. This behaves similarily to CloudFlare's Zone Flattening.

This plugin only works with the file middleware with upstream set, or when A or AAAA records exist alongside the CNAME record.

Preferrably, this should not be used in favour of the RFC drafts for the new ANAME records, but the DNS library used by CoreDNS does not support ANAME records yet.

Syntax

alias

Examples

example.com {
  file example.com.db {
    upstream 8.8.8.8
  }
  alias
}

All it does is transform records like this:

;; ANSWER SECTION:
example.com.	300	IN	CNAME	some.magic.example.org.
some.magic.example.org. 299 IN A	123.123.45.67

into

;; ANSWER SECTION:
example.com.	299	IN	A	123.123.45.67

Installation

$ go get github.com/coredns/coredns
$ go get github.com/serverwentdown/alias
$ cd $GOPATH/src/github.com/coredns/coredns
$ vim plugin.cfg
# Add the line alias:github.com/serverwentdown/alias before the file middleware
$ go generate
$ go build
$ ./coredns -plugins | grep alias