https://github.com/machsix/coredns-addition
https://github.com/machsix/coredns-addition
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/machsix/coredns-addition
- Owner: machsix
- License: apache-2.0
- Created: 2025-01-01T10:19:55.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-01-01T10:21:46.000Z (5 months ago)
- Last Synced: 2025-01-01T11:26:14.834Z (5 months ago)
- Language: Go
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CoreDNS Addition Plugin
## Introduction
The CoreDNS `addition` plugin is designed to extend the upstream DNS response by adding a specified DNS address to the response. This plugin shares a similar syntax to the official [template](https://coredns.io/plugins/template/) extension but requires an additional line to forward the DNS address. The main usage of this plugin is to enhance the upstream response with additional DNS information. For example, add your LAN IP for a homelab server.
## Example
To use the `addition` plugin, include the following configuration in your CoreDNS configuration file Corefile
```plaintext
. {
addition ANY ANY domain.duckdns.org {
forward DNS_ADDRESS
match "(\w*\.)?(domain\.duckdns\.org\.)$"
answer "{{ .Name }} 3600 {{ .Class }} A 192.168.1.100"
}
forward . 1.1.1.1
}
```Replace `DNS_ADDRESS` with the desired upstream IPv4 UDP DNS address.
## License
This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.